emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] TeX-master: TeX-master is let-bound


From: Christopher Schmidt
Subject: Re: [O] TeX-master: TeX-master is let-bound
Date: Thu, 24 Jan 2013 19:25:31 +0000 (GMT)

Christopher Schmidt <address@hidden> writes:
> The default value it t anyway.  The docstring suggests that this
> variable should be set via file variables.  I do not think org-mode
> should worry about AUCTeX.

Ping?

The default value of TeX-master is t.  Binding a symbol which might be
defvar'ed within the let-body does not work.  In fact, this might break
the Emacs instance, rendering any latex-mode buffer unusable.

To make a long story short, there is no excuse for the form in question.
Please remove it.  Everyone who messes with TeX-master should use
org-export-latex-final-hook to set TeX-master and/or add a local
variables list to the buffer.

    2013-01-24  Christopher Schmidt  <address@hidden>

            * org-latex.el (org-export-as-latex): Do not bind TeX-master.

--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -964,7 +964,6 @@ When PUB-DIR is set, use this as the publishing directory."
                   (concat filename ".tex")
                 filename)))
         (auto-insert nil); Avoid any auto-insert stuff for the new file
-        (TeX-master (boundp 'TeX-master))
         (buffer (if to-buffer
                     (if (eq to-buffer 'string)
                         (get-buffer-create "*Org LaTeX Export*")
@@ -1105,9 +1104,11 @@ When PUB-DIR is set, use this as the publishing 
directory."
     (or (eq (char-before) ?\n)
        (insert ?\n))

+    (when (and to-buffer
+               (not (derived-mode-p 'latex-mode)))
+      (latex-mode))
     (run-hooks 'org-export-latex-final-hook)
-    (if to-buffer
-       (unless (eq major-mode 'latex-mode) (latex-mode))
+    (unless to-buffer
       (save-buffer))
     (org-export-latex-fix-inputenc)
     (run-hooks 'org-export-latex-after-save-hook)
Thank you,

        Christopher

reply via email to

[Prev in Thread] Current Thread [Next in Thread]