From mboxrd@z Thu Jan 1 00:00:00 1970 From: suvayu ali Subject: Re: AUCTeX conflicting with org-mode Date: Wed, 21 Mar 2012 00:07:55 +0100 Message-ID: References: <87sjhlxako.fsf@live.com> <20423.1331134740@alphaville> <3555.1331150405@alphaville> <4125.1331159402@alphaville> <87399jo9go.fsf@live.com> <87r4wnpmbn.fsf@gnu.org> <877gyfkzrs.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SA8A8-0000So-Ov for emacs-orgmode@gnu.org; Tue, 20 Mar 2012 19:08:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SA8A6-0004y9-HJ for emacs-orgmode@gnu.org; Tue, 20 Mar 2012 19:08:20 -0400 In-Reply-To: <877gyfkzrs.fsf@gnu.org> 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: Bastien Cc: emacs-orgmode@gnu.org, Yagnesh Raghava Yakkala Hi Bastien, On Tue, Mar 20, 2012 at 17:23, Bastien wrote: > Hi Suvayu, > > suvayu ali writes: > >> I wanted to comment earlier but it slipped my mind, sorry about that. >> >> I am not sure if this patch is quite corect. It removes the let bind and >> instead conditionally uses setq to bind it to t. From the docs I see the >> variable becomes buffer local when set in any fashion, but does that >> still mean it is okay to use setq? >> >> I can imagine in a complicated publishing project, an org file might >> need to set the value to something. I suppose this will override any >> such custom config. Is my analysis correct? It might be worth thinking >> about before applying the patch. >> >> Is a conditional let binding possible, it might be the safer choice in >> that case. > > I applied a patch into hotfix-7.8.06 using the let binding -- let me > know if this works correctly. I don't think this works. The problem (thanks to Nick again for the analysis earlier in the thread[1] :-)) is the let bind happens before tex.el is loaded. So when it is loaded eventually, the defvar fails which in turn triggers the backtrace. The setq in the body works but could possibly mess up someone's custom config as I mentioned in my earlier post. I hope you see the no-win situation now (:-p), hence my apprehension about the fix earlier. That said, I guess you have two choices: 1. Leave the bug unsolved, hoping there will be a cleaner solution later. After all, there is a very simple workaround on the user side, do (load "tex.el") before using org-latex. 2. The second choice would be to partially fix the bug with the setq, but potentially break a future unsuspecting user with a non-standard config. If it were up to me, I would probably prefer option one. I hope this clears up everything. Footnotes: [1] -- Suvayu Open source is the future. It sets us free.