From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: orgmode and auctex Date: Fri, 24 Feb 2012 00:34:37 -0500 Message-ID: <6358.1330061677@alphaville> References: <10922.1328638512@alphaville> <4354.1328818115@alphaville> <14710.1328983889@alphaville> 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]:48047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0nny-0006VW-Jf for emacs-orgmode@gnu.org; Fri, 24 Feb 2012 00:34:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0nnv-00045V-Su for emacs-orgmode@gnu.org; Fri, 24 Feb 2012 00:34:53 -0500 Received: from g4t0016.houston.hp.com ([15.201.24.19]:49061) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0nnv-00042K-Nw for emacs-orgmode@gnu.org; Fri, 24 Feb 2012 00:34:51 -0500 In-Reply-To: Message from Christopher Witte of "Mon\, 20 Feb 2012 13\:57\:37 +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: Thomas Alexander Gerds , nicholas.dokos@hp.com, Org Mode , Carsten Dominik Christopher Witte wrote: > Hi all, >=20 > (setq TeX-auto-save t) > (setq TeX-parse-self t) > (setq-default TeX-master nil) > (make-variable-buffer-local 'TeX-master) ;; I think this is need because = the variable is not buffer > local until Auctex is active >=20 > (defun org-mode-reftex-setup () > =C2=A0 (setq TeX-master t) > =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 (progn > =C2=A0=C2=A0=C2=A0 =C2=A0(reftex-parse-all) > =C2=A0=C2=A0=C2=A0 =C2=A0(reftex-set-cite-format "[[cite:%l][%l]]"))) > =C2=A0 (define-key org-mode-map (kbd "C-c )") 'reftex-citation) > =C2=A0 (define-key org-mode-map (kbd "C-c (") 'org-mode-reftex-search)) > (add-hook 'org-mode-hook 'org-mode-reftex-setup) >=20 > This appears to work for me.=C2=A0 This should make the buffer local vers= ion of TeX-master "t" for all > org buffer and keep it the default otherwise.=C2=A0 Is this a good way to= work around this problem? >=20 I think so - at least, I can't think of a better way. Nick