From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Witte Subject: Re: orgmode and auctex Date: Fri, 24 Feb 2012 09:57:44 +0100 Message-ID: References: <10922.1328638512@alphaville> <4354.1328818115@alphaville> <14710.1328983889@alphaville> <6358.1330061677@alphaville> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b3395a539017804b9b1f42a Return-path: Received: from eggs.gnu.org ([140.186.70.92]:45841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0qyP-0003Wr-Jp for emacs-orgmode@gnu.org; Fri, 24 Feb 2012 03:57:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0qyI-0003ri-QL for emacs-orgmode@gnu.org; Fri, 24 Feb 2012 03:57:52 -0500 Received: from mail-pw0-f41.google.com ([209.85.160.41]:42555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0qyI-0003rb-Ht for emacs-orgmode@gnu.org; Fri, 24 Feb 2012 03:57:46 -0500 Received: by pbcwz17 with SMTP id wz17so2536579pbc.0 for ; Fri, 24 Feb 2012 00:57:44 -0800 (PST) In-Reply-To: <6358.1330061677@alphaville> 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: nicholas.dokos@hp.com Cc: Org Mode , Carsten Dominik --047d7b3395a539017804b9b1f42a Content-Type: text/plain; charset=ISO-8859-1 It's been working for me so far so I think I'll stick with it. Thanks for all your help. Chris. On 24 February 2012 06:34, Nick Dokos wrote: > Christopher Witte wrote: > > > Hi all, > > > > (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 > > > > (defun org-mode-reftex-setup () > > (setq TeX-master t) > > (load-library "reftex") > > (and (buffer-file-name) > > (file-exists-p (buffer-file-name)) > > (progn > > (reftex-parse-all) > > (reftex-set-cite-format "[[cite:%l][%l]]"))) > > (define-key org-mode-map (kbd "C-c )") 'reftex-citation) > > (define-key org-mode-map (kbd "C-c (") 'org-mode-reftex-search)) > > (add-hook 'org-mode-hook 'org-mode-reftex-setup) > > > > This appears to work for me. This should make the buffer local version > of TeX-master "t" for all > > org buffer and keep it the default otherwise. Is this a good way to > work around this problem? > > > > I think so - at least, I can't think of a better way. > > Nick > --047d7b3395a539017804b9b1f42a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable It's been working for me so far so I think I'll stick with it.
T= hanks for all your help.

Chris.

On= 24 February 2012 06:34, Nick Dokos <nicholas.dokos@hp.com> wrote:
Christopher Witte <chris@witte.net.au> wrote:

> Hi all,
>
> (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 b= ecause the variable is not buffer
> local until Auctex is active
>
> (defun org-mode-reftex-setup ()
> =A0 (setq TeX-master t)
> =A0 (load-library "reftex")
> =A0 (and (buffer-file-name)
> =A0=A0=A0=A0=A0=A0 (file-exists-p (buffer-file-name))
> =A0=A0=A0=A0=A0=A0 (progn
> =A0=A0=A0 =A0(reftex-parse-all)
> =A0=A0=A0 =A0(reftex-set-cite-format "[[cite:%l][%l]]"))) > =A0 (define-key org-mode-map (kbd "C-c )") 'reftex-citat= ion)
> =A0 (define-key org-mode-map (kbd "C-c (") 'org-mode-ref= tex-search))
> (add-hook 'org-mode-hook 'org-mode-reftex-setup)
>
> This appears to work for me.=A0 This should make the buffer local vers= ion of TeX-master "t" for all
> org buffer and keep it the default otherwise.=A0 Is this a good way to= work around this problem?
>

I think so - at least, I can't think of a better way.

Nick

--047d7b3395a539017804b9b1f42a--