Pārlūkot izejas kodu

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
Bastien Guerry 13 gadi atpakaļ
vecāks
revīzija
8c16d85476
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      lisp/org.el

+ 2 - 0
lisp/org.el

@@ -16713,6 +16713,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