emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* orgmode and auctex
@ 2012-02-07 17:55 Christopher Witte
  2012-02-07 18:15 ` Nick Dokos
  0 siblings, 1 reply; 12+ messages in thread
From: Christopher Witte @ 2012-02-07 17:55 UTC (permalink / raw)
  To: Org Mode

[-- Attachment #1: Type: text/plain, Size: 952 bytes --]

I've had a small problem with orgmode and auctex.  Follwing the auctex
quickstart I added the following to my .emacs

(setq-default TeX-master nil)

and then from the orgmode FAQ to setup reftex in orgmode I added the
following

(defun org-mode-reftex-setup ()
  (load-library "reftex")
  (and (buffer-file-name)
       (file-exists-p (buffer-file-name))
       (reftex-parse-all))
  (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
(add-hook 'org-mode-hook 'org-mode-reftex-setup)

With both of these, whenever I opened an org file I was asked to name the
master file.  If I comment out the setq-default I don't get the behaviour I
would like with mulitfile tex files.  My solution was to change

(setq-default TeX-master nil)

to

(add-hook 'TeX-mode-hook (lambda ()
               (setq-default TeX-master nil)))

I then appear to get the behaviour I desire.  Is this a good way to do
this?  If so I might add it to the FAQ.

Cheers
Chris.

[-- Attachment #2: Type: text/html, Size: 1090 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: orgmode and auctex
  2012-02-07 17:55 orgmode and auctex Christopher Witte
@ 2012-02-07 18:15 ` Nick Dokos
  2012-02-09 16:42   ` Christopher Witte
  0 siblings, 1 reply; 12+ messages in thread
From: Nick Dokos @ 2012-02-07 18:15 UTC (permalink / raw)
  To: Christopher Witte; +Cc: nicholas.dokos, Org Mode

Christopher Witte <chris@witte.net.au> wrote:

> I've had a small problem with orgmode and auctex.  Follwing the auctex quickstart I added the
> following to my .emacs
> 
> (setq-default TeX-master nil)
> 
> and then from the orgmode FAQ to setup reftex in orgmode I added the following
> 
> (defun org-mode-reftex-setup ()
>   (load-library "reftex")
>   (and (buffer-file-name)
>        (file-exists-p (buffer-file-name))
>        (reftex-parse-all))
>   (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
> (add-hook 'org-mode-hook 'org-mode-reftex-setup)
> 
> With both of these, whenever I opened an org file I was asked to name the master file.  If I comment
> out the setq-default I don't get the behaviour I would like with mulitfile tex files.  My solution
> was to change
> 
> (setq-default TeX-master nil)
> 
> to
> 
> (add-hook 'TeX-mode-hook (lambda ()
>                (setq-default TeX-master nil)))
> 
> I then appear to get the behaviour I desire.  Is this a good way to do this?  If so I might add it
> to the FAQ.
> 

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: orgmode and auctex
  2012-02-07 18:15 ` Nick Dokos
@ 2012-02-09 16:42   ` Christopher Witte
  2012-02-09 19:59     ` Thomas Alexander Gerds
  0 siblings, 1 reply; 12+ messages in thread
From: Christopher Witte @ 2012-02-09 16:42 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Org Mode

[-- Attachment #1: Type: text/plain, Size: 2463 bytes --]

OK so using the setq-default inside a hook is probably not a good idea.
But I can reliably reproduce this problem, I'm surprised you couldn't.  If
I start emacs using emacs -Q and open an org file everything is fine.  If I
then evaluate this

(setq-default TeX-master nil)

(defun org-mode-reftex-setup ()
  (load-library "reftex")
  (and (buffer-file-name)
       (file-exists-p (buffer-file-name))
       (reftex-parse-all))
  (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
(add-hook 'org-mode-hook 'org-mode-reftex-setup)

and try to open an org file I get prompted "Master file: ~/".  I'm running
Ubuntu 11.10 and the emacs-snapshot package: GNU Emacs 23.3.1
(i686-pc-linux-gnu, GTK+ Version 2.24.5), latest org pulled from git today.
Is there any more information I could provide to help diagnose this problem?

Cheers
Chris.

On 7 February 2012 19:15, Nick Dokos <nicholas.dokos@hp.com> wrote:

> Christopher Witte <chris@witte.net.au> wrote:
>
> > I've had a small problem with orgmode and auctex.  Follwing the auctex
> quickstart I added the
> > following to my .emacs
> >
> > (setq-default TeX-master nil)
> >
> > and then from the orgmode FAQ to setup reftex in orgmode I added the
> following
> >
> > (defun org-mode-reftex-setup ()
> >   (load-library "reftex")
> >   (and (buffer-file-name)
> >        (file-exists-p (buffer-file-name))
> >        (reftex-parse-all))
> >   (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
> > (add-hook 'org-mode-hook 'org-mode-reftex-setup)
> >
> > With both of these, whenever I opened an org file I was asked to name
> the master file.  If I comment
> > out the setq-default I don't get the behaviour I would like with
> mulitfile tex files.  My solution
> > was to change
> >
> > (setq-default TeX-master nil)
> >
> > to
> >
> > (add-hook 'TeX-mode-hook (lambda ()
> >                (setq-default TeX-master nil)))
> >
> > I then appear to get the behaviour I desire.  Is this a good way to do
> this?  If so I might add it
> > to the FAQ.
> >
>
> 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
>

[-- Attachment #2: Type: text/html, Size: 3208 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: orgmode and auctex
  2012-02-09 16:42   ` Christopher Witte
@ 2012-02-09 19:59     ` Thomas Alexander Gerds
  2012-02-09 20:08       ` Nick Dokos
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Alexander Gerds @ 2012-02-09 19:59 UTC (permalink / raw)
  To: Christopher Witte; +Cc: nicholas.dokos, Org Mode


Hi Chris,

maybe I cannot follow exactly what you are trying to do, but when I
start emacs -q and evaluate (setq-default TeX-master nil) and then open
a new file test.tex, then I get the same prompt "Master file:".

so maybe, if you do not want to get prompted, you could try setting
(setq-default TeX-master t). 

Cheers
Tomy



Christopher Witte <chris@witte.net.au> writes:

> OK so using the setq-default inside a hook is probably not a good
> idea.
> But I can reliably reproduce this problem, I'm surprised you couldn't.
> If
> I start emacs using emacs -Q and open an org file everything is fine.
> If I
> then evaluate this
>
> (setq-default TeX-master nil)
>
> (defun org-mode-reftex-setup ()
>   (load-library "reftex")
>   (and (buffer-file-name)
>        (file-exists-p (buffer-file-name))
>        (reftex-parse-all))
>   (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
> (add-hook 'org-mode-hook 'org-mode-reftex-setup)
>
> and try to open an org file I get prompted "Master file: ~/".  I'm
> running
> Ubuntu 11.10 and the emacs-snapshot package: GNU Emacs 23.3.1
> (i686-pc-linux-gnu, GTK+ Version 2.24.5), latest org pulled from git
> today.
> Is there any more information I could provide to help diagnose this
> problem?
>
> Cheers
> Chris.
>
> On 7 February 2012 19:15, Nick Dokos <nicholas.dokos@hp.com> wrote:
>
>> Christopher Witte <chris@witte.net.au> wrote:
>>
>> > I've had a small problem with orgmode and auctex.  Follwing the
> auctex
>> quickstart I added the
>> > following to my .emacs
>> >
>> > (setq-default TeX-master nil)
>> >
>> > and then from the orgmode FAQ to setup reftex in orgmode I added
> the
>> following
>> >
>> > (defun org-mode-reftex-setup ()
>> >   (load-library "reftex")
>> >   (and (buffer-file-name)
>> >        (file-exists-p (buffer-file-name))
>> >        (reftex-parse-all))
>> >   (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
>> > (add-hook 'org-mode-hook 'org-mode-reftex-setup)
>> >
>> > With both of these, whenever I opened an org file I was asked to
> name
>> the master file.  If I comment
>> > out the setq-default I don't get the behaviour I would like with
>> mulitfile tex files.  My solution
>> > was to change
>> >
>> > (setq-default TeX-master nil)
>> >
>> > to
>> >
>> > (add-hook 'TeX-mode-hook (lambda ()
>> >                (setq-default TeX-master nil)))
>> >
>> > I then appear to get the behaviour I desire.  Is this a good way
> to do
>> this?  If so I might add it
>> > to the FAQ.
>> >
>>
>> 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
>>
--
Thomas A. Gerds -- Assoc. Prof. Department of Biostatistics
University of Copenhagen, Øster Farimagsgade 5, 1014 Copenhagen, Denmark
Office: CSS-15.2.07 (Gamle Kommunehospital)
tel: 35327914 (sec: 35327901) 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: orgmode and auctex
  2012-02-09 19:59     ` Thomas Alexander Gerds
@ 2012-02-09 20:08       ` Nick Dokos
  2012-02-11 17:21         ` Christopher Witte
  2012-02-11 17:40         ` Carsten Dominik
  0 siblings, 2 replies; 12+ messages in thread
From: Nick Dokos @ 2012-02-09 20:08 UTC (permalink / raw)
  To: Thomas Alexander Gerds; +Cc: nicholas.dokos, Org Mode, Christopher Witte

Thomas Alexander Gerds <tagteam@sund.ku.dk> wrote:

> 
> Hi Chris,
> 
> maybe I cannot follow exactly what you are trying to do, but when I
> start emacs -q and evaluate (setq-default TeX-master nil) and then open
> a new file test.tex, then I get the same prompt "Master file:".
> 

I think Chris means that he gets the prompt when he opens a .org file.
I couldn't reproduce that behavior when I tried it but I have not tried
it again yet.

Nick


> so maybe, if you do not want to get prompted, you could try setting
> (setq-default TeX-master t). 
> 
> Cheers
> Tomy
> 
> 
> 
> Christopher Witte <chris@witte.net.au> writes:
> 
> > OK so using the setq-default inside a hook is probably not a good
> > idea.
> > But I can reliably reproduce this problem, I'm surprised you couldn't.
> > If
> > I start emacs using emacs -Q and open an org file everything is fine.
> > If I
> > then evaluate this
> >
> > (setq-default TeX-master nil)
> >
> > (defun org-mode-reftex-setup ()
> >   (load-library "reftex")
> >   (and (buffer-file-name)
> >        (file-exists-p (buffer-file-name))
> >        (reftex-parse-all))
> >   (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
> > (add-hook 'org-mode-hook 'org-mode-reftex-setup)
> >
> > and try to open an org file I get prompted "Master file: ~/".  I'm
> > running
> > Ubuntu 11.10 and the emacs-snapshot package: GNU Emacs 23.3.1
> > (i686-pc-linux-gnu, GTK+ Version 2.24.5), latest org pulled from git
> > today.
> > Is there any more information I could provide to help diagnose this
> > problem?
> >
> > Cheers
> > Chris.
> >
> > On 7 February 2012 19:15, Nick Dokos <nicholas.dokos@hp.com> wrote:
> >
> >> Christopher Witte <chris@witte.net.au> wrote:
> >>
> >> > I've had a small problem with orgmode and auctex.  Follwing the
> > auctex
> >> quickstart I added the
> >> > following to my .emacs
> >> >
> >> > (setq-default TeX-master nil)
> >> >
> >> > and then from the orgmode FAQ to setup reftex in orgmode I added
> > the
> >> following
> >> >
> >> > (defun org-mode-reftex-setup ()
> >> >   (load-library "reftex")
> >> >   (and (buffer-file-name)
> >> >        (file-exists-p (buffer-file-name))
> >> >        (reftex-parse-all))
> >> >   (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
> >> > (add-hook 'org-mode-hook 'org-mode-reftex-setup)
> >> >
> >> > With both of these, whenever I opened an org file I was asked to
> > name
> >> the master file.  If I comment
> >> > out the setq-default I don't get the behaviour I would like with
> >> mulitfile tex files.  My solution
> >> > was to change
> >> >
> >> > (setq-default TeX-master nil)
> >> >
> >> > to
> >> >
> >> > (add-hook 'TeX-mode-hook (lambda ()
> >> >                (setq-default TeX-master nil)))
> >> >
> >> > I then appear to get the behaviour I desire.  Is this a good way
> > to do
> >> this?  If so I might add it
> >> > to the FAQ.
> >> >
> >>
> >> 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
> >>
> --
> Thomas A. Gerds -- Assoc. Prof. Department of Biostatistics
> University of Copenhagen, Øster Farimagsgade 5, 1014 Copenhagen, Denmark
> Office: CSS-15.2.07 (Gamle Kommunehospital)
> tel: 35327914 (sec: 35327901) 
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: orgmode and auctex
  2012-02-09 20:08       ` Nick Dokos
@ 2012-02-11 17:21         ` Christopher Witte
  2012-02-11 17:33           ` Nick Dokos
  2012-02-11 17:40         ` Carsten Dominik
  1 sibling, 1 reply; 12+ messages in thread
From: Christopher Witte @ 2012-02-11 17:21 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Thomas Alexander Gerds, Org Mode

[-- Attachment #1: Type: text/plain, Size: 4140 bytes --]

Yes, I get this response when I open a .org file. I only want it when I
open a .tex file.

Cheers,
Chris

On 9 February 2012 21:08, Nick Dokos <nicholas.dokos@hp.com> wrote:

> Thomas Alexander Gerds <tagteam@sund.ku.dk> wrote:
>
> >
> > Hi Chris,
> >
> > maybe I cannot follow exactly what you are trying to do, but when I
> > start emacs -q and evaluate (setq-default TeX-master nil) and then open
> > a new file test.tex, then I get the same prompt "Master file:".
> >
>
> I think Chris means that he gets the prompt when he opens a .org file.
> I couldn't reproduce that behavior when I tried it but I have not tried
> it again yet.
>
> Nick
>
>
> > so maybe, if you do not want to get prompted, you could try setting
> > (setq-default TeX-master t).
> >
> > Cheers
> > Tomy
> >
> >
> >
> > Christopher Witte <chris@witte.net.au> writes:
> >
> > > OK so using the setq-default inside a hook is probably not a good
> > > idea.
> > > But I can reliably reproduce this problem, I'm surprised you couldn't.
> > > If
> > > I start emacs using emacs -Q and open an org file everything is fine.
> > > If I
> > > then evaluate this
> > >
> > > (setq-default TeX-master nil)
> > >
> > > (defun org-mode-reftex-setup ()
> > >   (load-library "reftex")
> > >   (and (buffer-file-name)
> > >        (file-exists-p (buffer-file-name))
> > >        (reftex-parse-all))
> > >   (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
> > > (add-hook 'org-mode-hook 'org-mode-reftex-setup)
> > >
> > > and try to open an org file I get prompted "Master file: ~/".  I'm
> > > running
> > > Ubuntu 11.10 and the emacs-snapshot package: GNU Emacs 23.3.1
> > > (i686-pc-linux-gnu, GTK+ Version 2.24.5), latest org pulled from git
> > > today.
> > > Is there any more information I could provide to help diagnose this
> > > problem?
> > >
> > > Cheers
> > > Chris.
> > >
> > > On 7 February 2012 19:15, Nick Dokos <nicholas.dokos@hp.com> wrote:
> > >
> > >> Christopher Witte <chris@witte.net.au> wrote:
> > >>
> > >> > I've had a small problem with orgmode and auctex.  Follwing the
> > > auctex
> > >> quickstart I added the
> > >> > following to my .emacs
> > >> >
> > >> > (setq-default TeX-master nil)
> > >> >
> > >> > and then from the orgmode FAQ to setup reftex in orgmode I added
> > > the
> > >> following
> > >> >
> > >> > (defun org-mode-reftex-setup ()
> > >> >   (load-library "reftex")
> > >> >   (and (buffer-file-name)
> > >> >        (file-exists-p (buffer-file-name))
> > >> >        (reftex-parse-all))
> > >> >   (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
> > >> > (add-hook 'org-mode-hook 'org-mode-reftex-setup)
> > >> >
> > >> > With both of these, whenever I opened an org file I was asked to
> > > name
> > >> the master file.  If I comment
> > >> > out the setq-default I don't get the behaviour I would like with
> > >> mulitfile tex files.  My solution
> > >> > was to change
> > >> >
> > >> > (setq-default TeX-master nil)
> > >> >
> > >> > to
> > >> >
> > >> > (add-hook 'TeX-mode-hook (lambda ()
> > >> >                (setq-default TeX-master nil)))
> > >> >
> > >> > I then appear to get the behaviour I desire.  Is this a good way
> > > to do
> > >> this?  If so I might add it
> > >> > to the FAQ.
> > >> >
> > >>
> > >> 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
> > >>
> > --
> > Thomas A. Gerds -- Assoc. Prof. Department of Biostatistics
> > University of Copenhagen, Øster Farimagsgade 5, 1014 Copenhagen, Denmark
> > Office: CSS-15.2.07 (Gamle Kommunehospital)
> > tel: 35327914 (sec: 35327901)
> >
>

[-- Attachment #2: Type: text/html, Size: 5865 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: orgmode and auctex
  2012-02-11 17:21         ` Christopher Witte
@ 2012-02-11 17:33           ` Nick Dokos
  0 siblings, 0 replies; 12+ messages in thread
From: Nick Dokos @ 2012-02-11 17:33 UTC (permalink / raw)
  To: Christopher Witte; +Cc: Thomas Alexander Gerds, nicholas.dokos, Org Mode

Christopher Witte <chris@witte.net.au> wrote:

> Yes, I get this response when I open a .org file. I only want it when I open a .tex file.
> 
> Cheers,
> Chris
> 

I just reproduced it (no idea why I wasn't able to reproduce it earlier). Stay tuned.

Nick

> On 9 February 2012 21:08, Nick Dokos <nicholas.dokos@hp.com> wrote:
> 
>     Thomas Alexander Gerds <tagteam@sund.ku.dk> wrote:
>    
>     >
>     > Hi Chris,
>     >
>     > maybe I cannot follow exactly what you are trying to do, but when I
>     > start emacs -q and evaluate (setq-default TeX-master nil) and then open
>     > a new file test.tex, then I get the same prompt "Master file:".
>     >
>    
>     I think Chris means that he gets the prompt when he opens a .org file.
>     I couldn't reproduce that behavior when I tried it but I have not tried
>     it again yet.
>    
>     Nick
> 
>     > so maybe, if you do not want to get prompted, you could try setting
>     > (setq-default TeX-master t).
>     >
>     > Cheers
>     > Tomy
>     >
>     >
>     >
>     > Christopher Witte <chris@witte.net.au> writes:
>     >
>     > > OK so using the setq-default inside a hook is probably not a good
>     > > idea.
>     > > But I can reliably reproduce this problem, I'm surprised you couldn't.
>     > > If
>     > > I start emacs using emacs -Q and open an org file everything is fine.
>     > > If I
>     > > then evaluate this
>     > >
>     > > (setq-default TeX-master nil)
>     > >
>     > > (defun org-mode-reftex-setup ()
>     > >   (load-library "reftex")
>     > >   (and (buffer-file-name)
>     > >        (file-exists-p (buffer-file-name))
>     > >        (reftex-parse-all))
>     > >   (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
>     > > (add-hook 'org-mode-hook 'org-mode-reftex-setup)
>     > >
>     > > and try to open an org file I get prompted "Master file: ~/".  I'm
>     > > running
>     > > Ubuntu 11.10 and the emacs-snapshot package: GNU Emacs 23.3.1
>     > > (i686-pc-linux-gnu, GTK+ Version 2.24.5), latest org pulled from git
>     > > today.
>     > > Is there any more information I could provide to help diagnose this
>     > > problem?
>     > >
>     > > Cheers
>     > > Chris.
>     > >
>     > > On 7 February 2012 19:15, Nick Dokos <nicholas.dokos@hp.com> wrote:
>     > >
>     > >> Christopher Witte <chris@witte.net.au> wrote:
>     > >>
>     > >> > I've had a small problem with orgmode and auctex.  Follwing the
>     > > auctex
>     > >> quickstart I added the
>     > >> > following to my .emacs
>     > >> >
>     > >> > (setq-default TeX-master nil)
>     > >> >
>     > >> > and then from the orgmode FAQ to setup reftex in orgmode I added
>     > > the
>     > >> following
>     > >> >
>     > >> > (defun org-mode-reftex-setup ()
>     > >> >   (load-library "reftex")
>     > >> >   (and (buffer-file-name)
>     > >> >        (file-exists-p (buffer-file-name))
>     > >> >        (reftex-parse-all))
>     > >> >   (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
>     > >> > (add-hook 'org-mode-hook 'org-mode-reftex-setup)
>     > >> >
>     > >> > With both of these, whenever I opened an org file I was asked to
>     > > name
>     > >> the master file.  If I comment
>     > >> > out the setq-default I don't get the behaviour I would like with
>     > >> mulitfile tex files.  My solution
>     > >> > was to change
>     > >> >
>     > >> > (setq-default TeX-master nil)
>     > >> >
>     > >> > to
>     > >> >
>     > >> > (add-hook 'TeX-mode-hook (lambda ()
>     > >> >                (setq-default TeX-master nil)))
>     > >> >
>     > >> > I then appear to get the behaviour I desire.  Is this a good way
>     > > to do
>     > >> this?  If so I might add it
>     > >> > to the FAQ.
>     > >> >
>     > >>
>     > >> 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
>     > >>
>     > --
>     > Thomas A. Gerds -- Assoc. Prof. Department of Biostatistics
>     > University of Copenhagen, Øster Farimagsgade 5, 1014 Copenhagen, Denmark
>     > Office: CSS-15.2.07 (Gamle Kommunehospital)
>     > tel: 35327914 (sec: 35327901)
>     >
> 
> 
> ----------------------------------------------------
> Alternatives:
> 
> ----------------------------------------------------

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: orgmode and auctex
  2012-02-09 20:08       ` Nick Dokos
  2012-02-11 17:21         ` Christopher Witte
@ 2012-02-11 17:40         ` Carsten Dominik
  2012-02-11 18:11           ` Nick Dokos
  1 sibling, 1 reply; 12+ messages in thread
From: Carsten Dominik @ 2012-02-11 17:40 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Thomas Alexander Gerds, Org Mode, Christopher Witte


On 9.2.2012, at 21:08, Nick Dokos wrote:

> Thomas Alexander Gerds <tagteam@sund.ku.dk> wrote:
> 
>> 
>> Hi Chris,
>> 
>> maybe I cannot follow exactly what you are trying to do, but when I
>> start emacs -q and evaluate (setq-default TeX-master nil) and then open
>> a new file test.tex, then I get the same prompt "Master file:".
>> 
> 
> I think Chris means that he gets the prompt when he opens a .org file.
> I couldn't reproduce that behavior when I tried it but I have not tried
> it again yet.

I think this prompt comes from the function `reftex-TeX-master-file'.  The
user is prompted when TeX-master is an existing variable (i.e. AUCTeX
is loaded), and when its value is nil or `shared'.

Greetings

- Carsten

> 
> Nick
> 
> 
>> so maybe, if you do not want to get prompted, you could try setting
>> (setq-default TeX-master t). 
>> 
>> Cheers
>> Tomy
>> 
>> 
>> 
>> Christopher Witte <chris@witte.net.au> writes:
>> 
>>> OK so using the setq-default inside a hook is probably not a good
>>> idea.
>>> But I can reliably reproduce this problem, I'm surprised you couldn't.
>>> If
>>> I start emacs using emacs -Q and open an org file everything is fine.
>>> If I
>>> then evaluate this
>>> 
>>> (setq-default TeX-master nil)
>>> 
>>> (defun org-mode-reftex-setup ()
>>>  (load-library "reftex")
>>>  (and (buffer-file-name)
>>>       (file-exists-p (buffer-file-name))
>>>       (reftex-parse-all))
>>>  (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
>>> (add-hook 'org-mode-hook 'org-mode-reftex-setup)
>>> 
>>> and try to open an org file I get prompted "Master file: ~/".  I'm
>>> running
>>> Ubuntu 11.10 and the emacs-snapshot package: GNU Emacs 23.3.1
>>> (i686-pc-linux-gnu, GTK+ Version 2.24.5), latest org pulled from git
>>> today.
>>> Is there any more information I could provide to help diagnose this
>>> problem?
>>> 
>>> Cheers
>>> Chris.
>>> 
>>> On 7 February 2012 19:15, Nick Dokos <nicholas.dokos@hp.com> wrote:
>>> 
>>>> Christopher Witte <chris@witte.net.au> wrote:
>>>> 
>>>>> I've had a small problem with orgmode and auctex.  Follwing the
>>> auctex
>>>> quickstart I added the
>>>>> following to my .emacs
>>>>> 
>>>>> (setq-default TeX-master nil)
>>>>> 
>>>>> and then from the orgmode FAQ to setup reftex in orgmode I added
>>> the
>>>> following
>>>>> 
>>>>> (defun org-mode-reftex-setup ()
>>>>>  (load-library "reftex")
>>>>>  (and (buffer-file-name)
>>>>>       (file-exists-p (buffer-file-name))
>>>>>       (reftex-parse-all))
>>>>>  (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
>>>>> (add-hook 'org-mode-hook 'org-mode-reftex-setup)
>>>>> 
>>>>> With both of these, whenever I opened an org file I was asked to
>>> name
>>>> the master file.  If I comment
>>>>> out the setq-default I don't get the behaviour I would like with
>>>> mulitfile tex files.  My solution
>>>>> was to change
>>>>> 
>>>>> (setq-default TeX-master nil)
>>>>> 
>>>>> to
>>>>> 
>>>>> (add-hook 'TeX-mode-hook (lambda ()
>>>>>               (setq-default TeX-master nil)))
>>>>> 
>>>>> I then appear to get the behaviour I desire.  Is this a good way
>>> to do
>>>> this?  If so I might add it
>>>>> to the FAQ.
>>>>> 
>>>> 
>>>> 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
>>>> 
>> --
>> Thomas A. Gerds -- Assoc. Prof. Department of Biostatistics
>> University of Copenhagen, Øster Farimagsgade 5, 1014 Copenhagen, Denmark
>> Office: CSS-15.2.07 (Gamle Kommunehospital)
>> tel: 35327914 (sec: 35327901) 
>> 
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: orgmode and auctex
  2012-02-11 17:40         ` Carsten Dominik
@ 2012-02-11 18:11           ` Nick Dokos
  2012-02-20 12:57             ` Christopher Witte
  0 siblings, 1 reply; 12+ messages in thread
From: Nick Dokos @ 2012-02-11 18:11 UTC (permalink / raw)
  To: Carsten Dominik
  Cc: Thomas Alexander Gerds, nicholas.dokos, Org Mode,
	Christopher Witte

Carsten Dominik <carsten.dominik@gmail.com> wrote:

> 
> On 9.2.2012, at 21:08, Nick Dokos wrote:
> 
> > Thomas Alexander Gerds <tagteam@sund.ku.dk> wrote:
> > 
> >> 
> >> Hi Chris,
> >> 
> >> maybe I cannot follow exactly what you are trying to do, but when I
> >> start emacs -q and evaluate (setq-default TeX-master nil) and then open
> >> a new file test.tex, then I get the same prompt "Master file:".
> >> 
> > 
> > I think Chris means that he gets the prompt when he opens a .org file.
> > I couldn't reproduce that behavior when I tried it but I have not tried
> > it again yet.
> 
> I think this prompt comes from the function `reftex-TeX-master-file'. 
> 

Indeed - the backtrace is as follows:

  ...
  completing-read-default("Master file: " read-file-name-internal file-exists-p t "~/src/org/" file-name-history "~/src/org/foo.org" nil)
  completing-read("Master file: " read-file-name-internal file-exists-p t "~/src/org/" file-name-history "~/src/org/foo.org")
  read-file-name-default("Master file: " nil nil t nil nil)
  read-file-name("Master file: " nil nil t nil)
  reftex-TeX-master-file()
  reftex-tie-multifile-symbols()
  reftex-access-scan-info((16))
  reftex-parse-all()
  (and (buffer-file-name) (file-exists-p (buffer-file-name)) (reftex-parse-all))
  org-mode-reftex-setup()
  run-hooks(change-major-mode-after-body-hook text-mode-hook outline-mode-hook org-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook text-mode-hook outline-mode-hook org-mode-hook))
  run-mode-hooks(org-mode-hook)
  org-mode()
  set-auto-mode-0(org-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer foo.org> "~/src/org/foo.org" nil nil "~/src/org/foo.org" (3018153 2055))
  find-file-noselect("~/src/org/foo.org" nil nil t)
  find-file("~/src/org/foo.org" t)
  call-interactively(find-file nil nil)


> The user is prompted when TeX-master is an existing variable
> (i.e. AUCTeX is loaded), and when its value is nil or `shared'.

It's actually a bit more complicated than that: it checks if
TeX-master-file is defined as a function (i.e. AUCTEX is loaded) and if
so calls it. It then checks if tex-main-file is defined as a function
(i.e. Emacs LaTeX mode is loaded) and if so calls it. Then it check if
TeX-master is t (in which case (buffer-file-name) is called to set the
master, or 'shared (in which case it reads the file name) or non-nil (in
which case it is used verbatim) or nil (in which case it reads the file
name - the operative case here).

I'll leave it here for now: I've been sick for a couple of days and I
can't think straight right now (or ever...)

Nick


> Greetings
> 
> - Carsten
> 
> > 
> > Nick
> > 
> > 
> >> so maybe, if you do not want to get prompted, you could try setting
> >> (setq-default TeX-master t). 
> >> 
> >> Cheers
> >> Tomy
> >> 
> >> 
> >> 
> >> Christopher Witte <chris@witte.net.au> writes:
> >> 
> >>> OK so using the setq-default inside a hook is probably not a good
> >>> idea.
> >>> But I can reliably reproduce this problem, I'm surprised you couldn't.
> >>> If
> >>> I start emacs using emacs -Q and open an org file everything is fine.
> >>> If I
> >>> then evaluate this
> >>> 
> >>> (setq-default TeX-master nil)
> >>> 
> >>> (defun org-mode-reftex-setup ()
> >>>  (load-library "reftex")
> >>>  (and (buffer-file-name)
> >>>       (file-exists-p (buffer-file-name))
> >>>       (reftex-parse-all))
> >>>  (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
> >>> (add-hook 'org-mode-hook 'org-mode-reftex-setup)
> >>> 
> >>> and try to open an org file I get prompted "Master file: ~/".  I'm
> >>> running
> >>> Ubuntu 11.10 and the emacs-snapshot package: GNU Emacs 23.3.1
> >>> (i686-pc-linux-gnu, GTK+ Version 2.24.5), latest org pulled from git
> >>> today.
> >>> Is there any more information I could provide to help diagnose this
> >>> problem?
> >>> 
> >>> Cheers
> >>> Chris.
> >>> 
> >>> On 7 February 2012 19:15, Nick Dokos <nicholas.dokos@hp.com> wrote:
> >>> 
> >>>> Christopher Witte <chris@witte.net.au> wrote:
> >>>> 
> >>>>> I've had a small problem with orgmode and auctex.  Follwing the
> >>> auctex
> >>>> quickstart I added the
> >>>>> following to my .emacs
> >>>>> 
> >>>>> (setq-default TeX-master nil)
> >>>>> 
> >>>>> and then from the orgmode FAQ to setup reftex in orgmode I added
> >>> the
> >>>> following
> >>>>> 
> >>>>> (defun org-mode-reftex-setup ()
> >>>>>  (load-library "reftex")
> >>>>>  (and (buffer-file-name)
> >>>>>       (file-exists-p (buffer-file-name))
> >>>>>       (reftex-parse-all))
> >>>>>  (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
> >>>>> (add-hook 'org-mode-hook 'org-mode-reftex-setup)
> >>>>> 
> >>>>> With both of these, whenever I opened an org file I was asked to
> >>> name
> >>>> the master file.  If I comment
> >>>>> out the setq-default I don't get the behaviour I would like with
> >>>> mulitfile tex files.  My solution
> >>>>> was to change
> >>>>> 
> >>>>> (setq-default TeX-master nil)
> >>>>> 
> >>>>> to
> >>>>> 
> >>>>> (add-hook 'TeX-mode-hook (lambda ()
> >>>>>               (setq-default TeX-master nil)))
> >>>>> 
> >>>>> I then appear to get the behaviour I desire.  Is this a good way
> >>> to do
> >>>> this?  If so I might add it
> >>>>> to the FAQ.
> >>>>> 
> >>>> 
> >>>> 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
> >>>> 
> >> --
> >> Thomas A. Gerds -- Assoc. Prof. Department of Biostatistics
> >> University of Copenhagen, Øster Farimagsgade 5, 1014 Copenhagen, Denmark
> >> Office: CSS-15.2.07 (Gamle Kommunehospital)
> >> tel: 35327914 (sec: 35327901) 
> >> 
> > 
> 
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: orgmode and auctex
  2012-02-11 18:11           ` Nick Dokos
@ 2012-02-20 12:57             ` Christopher Witte
  2012-02-24  5:34               ` Nick Dokos
  0 siblings, 1 reply; 12+ messages in thread
From: Christopher Witte @ 2012-02-20 12:57 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Thomas Alexander Gerds, Org Mode, Carsten Dominik

[-- Attachment #1: Type: text/plain, Size: 7512 bytes --]

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?

Cheers,
Chris.



On 11 February 2012 19:11, Nick Dokos <nicholas.dokos@hp.com> wrote:

> Carsten Dominik <carsten.dominik@gmail.com> wrote:
>
> >
> > On 9.2.2012, at 21:08, Nick Dokos wrote:
> >
> > > Thomas Alexander Gerds <tagteam@sund.ku.dk> wrote:
> > >
> > >>
> > >> Hi Chris,
> > >>
> > >> maybe I cannot follow exactly what you are trying to do, but when I
> > >> start emacs -q and evaluate (setq-default TeX-master nil) and then
> open
> > >> a new file test.tex, then I get the same prompt "Master file:".
> > >>
> > >
> > > I think Chris means that he gets the prompt when he opens a .org file.
> > > I couldn't reproduce that behavior when I tried it but I have not tried
> > > it again yet.
> >
> > I think this prompt comes from the function `reftex-TeX-master-file'.
> >
>
> Indeed - the backtrace is as follows:
>
>  ...
>  completing-read-default("Master file: " read-file-name-internal
> file-exists-p t "~/src/org/" file-name-history "~/src/org/foo.org" nil)
>  completing-read("Master file: " read-file-name-internal file-exists-p t
> "~/src/org/" file-name-history "~/src/org/foo.org")
>  read-file-name-default("Master file: " nil nil t nil nil)
>  read-file-name("Master file: " nil nil t nil)
>  reftex-TeX-master-file()
>  reftex-tie-multifile-symbols()
>  reftex-access-scan-info((16))
>  reftex-parse-all()
>   (and (buffer-file-name) (file-exists-p (buffer-file-name))
> (reftex-parse-all))
>   org-mode-reftex-setup()
>  run-hooks(change-major-mode-after-body-hook text-mode-hook
> outline-mode-hook org-mode-hook)
>  apply(run-hooks (change-major-mode-after-body-hook text-mode-hook
> outline-mode-hook org-mode-hook))
>  run-mode-hooks(org-mode-hook)
>  org-mode()
>  set-auto-mode-0(org-mode nil)
>  set-auto-mode()
>  normal-mode(t)
>  after-find-file(nil t)
>  find-file-noselect-1(#<buffer foo.org> "~/src/org/foo.org" nil nil
> "~/src/org/foo.org" (3018153 2055))
>  find-file-noselect("~/src/org/foo.org" nil nil t)
>  find-file("~/src/org/foo.org" t)
>  call-interactively(find-file nil nil)
>
>
> > The user is prompted when TeX-master is an existing variable
> > (i.e. AUCTeX is loaded), and when its value is nil or `shared'.
>
> It's actually a bit more complicated than that: it checks if
> TeX-master-file is defined as a function (i.e. AUCTEX is loaded) and if
> so calls it. It then checks if tex-main-file is defined as a function
> (i.e. Emacs LaTeX mode is loaded) and if so calls it. Then it check if
> TeX-master is t (in which case (buffer-file-name) is called to set the
> master, or 'shared (in which case it reads the file name) or non-nil (in
> which case it is used verbatim) or nil (in which case it reads the file
> name - the operative case here).
>
> I'll leave it here for now: I've been sick for a couple of days and I
> can't think straight right now (or ever...)
>
> Nick
>
>
> > Greetings
> >
> > - Carsten
> >
> > >
> > > Nick
> > >
> > >
> > >> so maybe, if you do not want to get prompted, you could try setting
> > >> (setq-default TeX-master t).
> > >>
> > >> Cheers
> > >> Tomy
> > >>
> > >>
> > >>
> > >> Christopher Witte <chris@witte.net.au> writes:
> > >>
> > >>> OK so using the setq-default inside a hook is probably not a good
> > >>> idea.
> > >>> But I can reliably reproduce this problem, I'm surprised you
> couldn't.
> > >>> If
> > >>> I start emacs using emacs -Q and open an org file everything is fine.
> > >>> If I
> > >>> then evaluate this
> > >>>
> > >>> (setq-default TeX-master nil)
> > >>>
> > >>> (defun org-mode-reftex-setup ()
> > >>>  (load-library "reftex")
> > >>>  (and (buffer-file-name)
> > >>>       (file-exists-p (buffer-file-name))
> > >>>       (reftex-parse-all))
> > >>>  (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
> > >>> (add-hook 'org-mode-hook 'org-mode-reftex-setup)
> > >>>
> > >>> and try to open an org file I get prompted "Master file: ~/".  I'm
> > >>> running
> > >>> Ubuntu 11.10 and the emacs-snapshot package: GNU Emacs 23.3.1
> > >>> (i686-pc-linux-gnu, GTK+ Version 2.24.5), latest org pulled from git
> > >>> today.
> > >>> Is there any more information I could provide to help diagnose this
> > >>> problem?
> > >>>
> > >>> Cheers
> > >>> Chris.
> > >>>
> > >>> On 7 February 2012 19:15, Nick Dokos <nicholas.dokos@hp.com> wrote:
> > >>>
> > >>>> Christopher Witte <chris@witte.net.au> wrote:
> > >>>>
> > >>>>> I've had a small problem with orgmode and auctex.  Follwing the
> > >>> auctex
> > >>>> quickstart I added the
> > >>>>> following to my .emacs
> > >>>>>
> > >>>>> (setq-default TeX-master nil)
> > >>>>>
> > >>>>> and then from the orgmode FAQ to setup reftex in orgmode I added
> > >>> the
> > >>>> following
> > >>>>>
> > >>>>> (defun org-mode-reftex-setup ()
> > >>>>>  (load-library "reftex")
> > >>>>>  (and (buffer-file-name)
> > >>>>>       (file-exists-p (buffer-file-name))
> > >>>>>       (reftex-parse-all))
> > >>>>>  (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
> > >>>>> (add-hook 'org-mode-hook 'org-mode-reftex-setup)
> > >>>>>
> > >>>>> With both of these, whenever I opened an org file I was asked to
> > >>> name
> > >>>> the master file.  If I comment
> > >>>>> out the setq-default I don't get the behaviour I would like with
> > >>>> mulitfile tex files.  My solution
> > >>>>> was to change
> > >>>>>
> > >>>>> (setq-default TeX-master nil)
> > >>>>>
> > >>>>> to
> > >>>>>
> > >>>>> (add-hook 'TeX-mode-hook (lambda ()
> > >>>>>               (setq-default TeX-master nil)))
> > >>>>>
> > >>>>> I then appear to get the behaviour I desire.  Is this a good way
> > >>> to do
> > >>>> this?  If so I might add it
> > >>>>> to the FAQ.
> > >>>>>
> > >>>>
> > >>>> 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
> > >>>>
> > >> --
> > >> Thomas A. Gerds -- Assoc. Prof. Department of Biostatistics
> > >> University of Copenhagen, Øster Farimagsgade 5, 1014 Copenhagen,
> Denmark
> > >> Office: CSS-15.2.07 (Gamle Kommunehospital)
> > >> tel: 35327914 (sec: 35327901)
> > >>
> > >
> >
> >
>

[-- Attachment #2: Type: text/html, Size: 10841 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: orgmode and auctex
  2012-02-20 12:57             ` Christopher Witte
@ 2012-02-24  5:34               ` Nick Dokos
  2012-02-24  8:57                 ` Christopher Witte
  0 siblings, 1 reply; 12+ messages in thread
From: Nick Dokos @ 2012-02-24  5:34 UTC (permalink / raw)
  To: Christopher Witte
  Cc: Thomas Alexander Gerds, nicholas.dokos, Org Mode, Carsten Dominik

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 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: orgmode and auctex
  2012-02-24  5:34               ` Nick Dokos
@ 2012-02-24  8:57                 ` Christopher Witte
  0 siblings, 0 replies; 12+ messages in thread
From: Christopher Witte @ 2012-02-24  8:57 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Org Mode, Carsten Dominik

[-- Attachment #1: Type: text/plain, Size: 1203 bytes --]

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 <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 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
>

[-- Attachment #2: Type: text/html, Size: 1804 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-02-24  8:57 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-07 17:55 orgmode and auctex Christopher Witte
2012-02-07 18:15 ` Nick Dokos
2012-02-09 16:42   ` Christopher Witte
2012-02-09 19:59     ` Thomas Alexander Gerds
2012-02-09 20:08       ` Nick Dokos
2012-02-11 17:21         ` Christopher Witte
2012-02-11 17:33           ` Nick Dokos
2012-02-11 17:40         ` Carsten Dominik
2012-02-11 18:11           ` Nick Dokos
2012-02-20 12:57             ` Christopher Witte
2012-02-24  5:34               ` Nick Dokos
2012-02-24  8:57                 ` Christopher Witte

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).