From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yagnesh Raghava Yakkala Subject: Re: AUCTeX conflicting with org-mode Date: Thu, 08 Mar 2012 16:09:11 +0900 Message-ID: <87399jo9go.fsf@live.com> References: <87sjhlxako.fsf@live.com> <20423.1331134740@alphaville> <3555.1331150405@alphaville> <4125.1331159402@alphaville> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5XTh-0006Yp-KY for emacs-orgmode@gnu.org; Thu, 08 Mar 2012 02:09:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S5XTe-0005HF-OF for emacs-orgmode@gnu.org; Thu, 08 Mar 2012 02:09:33 -0500 Received: from plane.gmane.org ([80.91.229.3]:41730) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5XTe-0005H5-Hs for emacs-orgmode@gnu.org; Thu, 08 Mar 2012 02:09:30 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1S5XTa-0001hf-9a for emacs-orgmode@gnu.org; Thu, 08 Mar 2012 08:09:26 +0100 Received: from 59x158x65x92.ap59.ftth.ucom.ne.jp ([59.158.65.92]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Mar 2012 08:09:26 +0100 Received: from yagnesh by 59x158x65x92.ap59.ftth.ucom.ne.jp with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Mar 2012 08:09:26 +0100 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 Hello Nick., Nick Dokos writes: > suvayu ali wrote: > [snipped] > > Actually, your backtrace in the original post makes things clearer now. > > org-export-as-latex calls find-file-noselect on the .tex file, which > calls after-find-file which runs the find-file-hook. Somehow the > find-file-hook is set up[fn:1] as in VirTeX-common-initialization to > call TeX-master-file - although your backtrace shows compiled code, it's > pretty clear that that's the setting of the find-file-hook that > VirTeX-common-initialization has done. So it looks as if tex.el is > partially loaded: the initialization is done, the hook is set up but the > defvar has failed, probably because of the let-bind. Thanks for the analysis. I think you are right. With my limited elisp skills I would say its a *bug* and coming from org. If I take that let-binding off and setting the TeX-master by checking with if it ever bound seems fixing this problem. this patch fixing the problem. (can be further improved) --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=org-latex.diff diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 03664b4..9e53849 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -885,7 +885,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 t) ; Avoid the Query for TeX master from AUCTeX (buffer (if to-buffer (cond ((eq to-buffer 'string) (get-buffer-create @@ -958,6 +957,8 @@ when PUB-DIR is set, use this as the publishing directory." :exclude-tags (plist-get opt-plist :exclude-tags) :LaTeX-fragments nil))) + (if (boundp 'TeX-master) (setq TeX-master t)) ; Avoid the Query for TeX master from AUCTeX + (set-buffer buffer) (erase-buffer) (org-install-letbind) --=-=-= Content-Type: text/plain -- YYR --=-=-=--