emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christopher Schmidt <christopher@ch.ristopher.com>
To: emacs-orgmode@gnu.org
Subject: Re: TeX-master: TeX-master is let-bound
Date: Fri, 25 Jan 2013 11:36:02 +0000 (GMT)	[thread overview]
Message-ID: <878v7hze8k@ch.ristopher.com> (raw)
In-Reply-To: <871ud9zgpn.fsf@bzg.ath.cx> (Bastien's message of "Fri, 25 Jan 2013 11:42:44 +0100")

Bastien <bzg@altern.org> writes:

Hi Bastien,

thanks for your reply.

> Christopher Schmidt <christopher@ch.ristopher.com> writes:
>> Christopher Schmidt <christopher@ch.ristopher.com> writes:
>>> The default value it t anyway.  The docstring suggests that this
>>> variable should be set via file variables.  I do not think org-mode
>>> should worry about AUCTeX.
>>
>> Ping?
>>
>> The default value of TeX-master is t.  Binding a symbol which might
>> be defvar'ed within the let-body does not work.  In fact, this might
>> break the Emacs instance, rendering any latex-mode buffer unusable.
>
> Can you provide a reproducible recipe?

I already did, check <87390w51k0@ch.ristopher.com>.  The issue I
described will only occur if one uses AUCTeX and AUCTeX has not been
loaded already.  Nick did not follow the recipe so he was not able to
reproduce.

>> To make a long story short, there is no excuse for the form in
>> question.  Please remove it.  Everyone who messes with TeX-master
>> should use org-export-latex-final-hook to set TeX-master and/or add a
>> local variables list to the buffer.
>
> I skimmed the previous discussions, and my understanding is that the
> patch will break things for some users, even those who don't mess with
> TeX-master.

It does not break anything for those who do not customise TeX-master.

Those poor souls who do customise TeX-master can easily get back to The
Right Thing using org-export-latex-final-hook.

TeX-master is not meant to be customised by default anyway!

    TeX-master is a variable defined in `tex.el'.
    Its value is t

      Automatically becomes buffer-local when set.
      This variable is safe as a file local variable if its value
      satisfies the predicate `(lambda (x) (or (stringp x) (member x (quote (t nil shared dwim)))))'.

    Documentation:
    *The master file associated with the current buffer.
    If the file being edited is actually included from another file, you
    can tell AUCTeX the name of the master file by setting this variable.
    If there are multiple levels of nesting, specify the top level file.
    [...]
    It is suggested that you use the File Variables (see the info node in
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    the Emacs manual) to set this variable permanently for each file.
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Is it so?  If yes, can we make a better patch?

I do not think so.

I do not see what's breaking here.  The users gets what he wanna get.

We could come up with some magic that preloads latex-mode (I proposed
that in <87r4ods7fw@ch.ristopher.com>) and sets TeX-master buffer
locally iff latex-mode actually defines this var.  Yet, this is not how
things should be.  Org cannot, and should not, mess with other
packages.  Customising TeX-master is the bug, and it is on the users
side.

Bastien, thank you so much for looking into this issue.  It has been
bothering for quite some time.

Greetings,

        Christopher

  reply	other threads:[~2013-01-25 11:36 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-25 16:48 TeX-master: TeX-master is let-bound Christopher Schmidt
2012-10-25 21:45 ` Suvayu Ali
2012-10-25 22:19   ` Christopher Schmidt
2012-10-26  6:51     ` Suvayu Ali
2012-10-26  8:43       ` Christopher Schmidt
2012-10-26  9:30         ` Christopher Witte
2012-10-26 11:41           ` Suvayu Ali
2012-10-26 15:34           ` Christopher Schmidt
     [not found]             ` <christopher@ch.ristopher.com>
2012-10-26 16:31               ` Nick Dokos
2012-10-29 21:18                 ` Christopher Schmidt
2012-10-29 22:25               ` Nick Dokos
2012-10-29 22:57                 ` Christopher Schmidt
2013-02-23  9:16                   ` Bastien
2013-02-23 14:32                     ` Christopher Schmidt
2013-03-02 15:11                       ` Bastien
2012-11-01 14:50                 ` Christopher Schmidt
2012-10-29 23:25               ` Nick Dokos
2012-10-30  7:52                 ` Christopher Schmidt
2012-10-30 17:45               ` Nick Dokos
2012-10-30 19:01                 ` Christopher Schmidt
2012-10-30 20:32                 ` Sebastien Vauban
2012-10-30 20:54                   ` Nick Dokos
2012-11-01 15:22               ` Nick Dokos
2013-01-24 19:25         ` Christopher Schmidt
2013-01-25 10:42           ` Bastien
2013-01-25 11:36             ` Christopher Schmidt [this message]
2013-01-26 13:54               ` Christopher Schmidt
2013-01-26 14:20                 ` Bastien
2013-01-26 14:28                   ` Christopher Schmidt
2013-01-26 15:35                     ` Bastien
2013-01-26 16:23                       ` Christopher Schmidt
2013-02-19 10:38           ` Christopher Schmidt

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=878v7hze8k@ch.ristopher.com \
    --to=christopher@ch.ristopher.com \
    --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).