TEC <tecos...@gmail.com> writes: > - (end (progn (goto-char (org-element-property :end datum)) > - (search-backward "}" (line-beginning-position) t)))) > + (end (org-with-point-at (org-element-property :end datum) > + (skip-chars-backward " \t") > + (point)))) > + (list beg end (buffer-substring-no-properties beg end)))) > + ((eq type 'latex-fragment) > + (let ((beg (org-element-property :begin datum)) > + (end (org-element-property :end datum)))
It seems you're mixing inline source blocks and LaTeX fragment. You modified the former, but not the latter. > + (lambda () ; trim content > + (goto-char (point-min)) This is not needed. The function is always called at `point-min'. > + (skip-chars-forward " \t") > + (delete-region (point-min) (point)) > + (goto-char (point-max)) > + (skip-chars-backward " \t") > + (delete-region (point) (point-max)))) I'm not sure this clean-up is necessary. Is it?