From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: orgmode and auctex Date: Tue, 07 Feb 2012 13:15:12 -0500 Message-ID: <10922.1328638512@alphaville> References: Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:44585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RupZY-0006oy-4w for emacs-orgmode@gnu.org; Tue, 07 Feb 2012 13:15:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RupZT-0004mB-VL for emacs-orgmode@gnu.org; Tue, 07 Feb 2012 13:15:20 -0500 Received: from g4t0016.houston.hp.com ([15.201.24.19]:25118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RupZT-0004m2-PT for emacs-orgmode@gnu.org; Tue, 07 Feb 2012 13:15:15 -0500 In-Reply-To: Message from Christopher Witte of "Tue\, 07 Feb 2012 18\:55\:23 +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: Christopher Witte Cc: nicholas.dokos@hp.com, Org Mode Christopher Witte wrote: > I've had a small problem with orgmode and auctex.=C2=A0 Follwing the auct= ex quickstart I added the > following to my .emacs >=20 > (setq-default TeX-master nil) >=20 > and then from the orgmode FAQ to setup reftex in orgmode I added the foll= owing >=20 > (defun org-mode-reftex-setup () > =C2=A0 (load-library "reftex") > =C2=A0 (and (buffer-file-name) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (file-exists-p (buffer-file-name)) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (reftex-parse-all)) > =C2=A0 (define-key org-mode-map (kbd "C-c )") 'reftex-citation)) > (add-hook 'org-mode-hook 'org-mode-reftex-setup) >=20 > With both of these, whenever I opened an org file I was asked to name the= master file.=C2=A0 If I comment > out the setq-default I don't get the behaviour I would like with mulitfil= e tex files.=C2=A0 My solution > was to change >=20 > (setq-default TeX-master nil) >=20 > to >=20 > (add-hook 'TeX-mode-hook (lambda () > =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 (se= tq-default TeX-master nil))) >=20 > I then appear to get the behaviour I desire.=C2=A0 Is this a good way to = do this?=C2=A0 If so I might add it > to the FAQ. >=20 Probably not. setq-default sets the default value of the variable whereas the hook is supposed to set the local value in order to override the default value: setting the default value from a hook seems backwards to me. Actually, I added the above code (*without* the TeX-mode-hook mod) to my minimal .emacs and opening org files does not generate any questions. Are you sure you have diagnosed the problem correctly? Nick