From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Schmidt Subject: Re: TeX-master: TeX-master is let-bound Date: Thu, 24 Jan 2013 19:25:31 +0000 (GMT) Message-ID: <87ham6s7rf@ch.ristopher.com> References: <87a9vajy4n@ch.ristopher.com> <20121025214510.GB24961@kuru.dyndns-at-home.com> <87sj92chzi@ch.ristopher.com> <20121026065115.GC24961@kuru.dyndns-at-home.com> <87mwz98vz4@ch.ristopher.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:45496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TySQe-0007AD-GO for emacs-orgmode@gnu.org; Thu, 24 Jan 2013 14:25:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TySQb-0001Jj-DG for emacs-orgmode@gnu.org; Thu, 24 Jan 2013 14:25:40 -0500 Received: from ristopher.com ([146.185.21.93]:44132 helo=saturn.ch.ristopher.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TySQb-0001JJ-5C for emacs-orgmode@gnu.org; Thu, 24 Jan 2013 14:25:37 -0500 In-Reply-To: <87mwz98vz4@ch.ristopher.com> (Christopher Schmidt's message of "Fri, 26 Oct 2012 09:43:12 +0100 (BST)") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Christopher Schmidt 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 * org-latex.el (org-export-as-latex): Do not bind TeX-master. --=-=-= Content-Type: text/x-diff Content-Disposition: inline --- 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) --=-=-= Content-Type: text/plain Thank you, Christopher --=-=-=--