0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-18 23:10:05 +00:00

org.el: `org-preview-latex-fragment' requires a buffer file name.

* org.el (org-preview-latex-fragment): Throw an error when
called from a non-file buffer.

This take care of this bug:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3768
This commit is contained in:
Bastien Guerry 2012-01-26 09:24:51 +01:00
parent 471ddbd14e
commit 25ddcb9c35

View file

@ -16764,6 +16764,8 @@ the cursor is before the first headline,
display all fragments in the buffer.
The images can be removed again with \\[org-ctrl-c-ctrl-c]."
(interactive "P")
(unless buffer-file-name
(error "Can't preview LaTeX fragment in a non-file buffer"))
(org-remove-latex-fragment-image-overlays)
(save-excursion
(save-restriction