emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Christopher Witte <chris@witte.net.au>
Cc: nicholas.dokos@hp.com, Org Mode <emacs-orgmode@gnu.org>
Subject: Re: orgmode and auctex
Date: Tue, 07 Feb 2012 13:15:12 -0500	[thread overview]
Message-ID: <10922.1328638512@alphaville> (raw)
In-Reply-To: Message from Christopher Witte <chris@witte.net.au> of "Tue\, 07 Feb 2012 18\:55\:23 +0100." <CAALnB3E8eR_kqZaKNQiRa4fz6++YZsO_yLzrLG=DqOpQi5VM6g@mail.gmail.com>

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

  reply	other threads:[~2012-02-07 18:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-07 17:55 orgmode and auctex Christopher Witte
2012-02-07 18:15 ` Nick Dokos [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10922.1328638512@alphaville \
    --to=nicholas.dokos@hp.com \
    --cc=chris@witte.net.au \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).