emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] TeX-master: TeX-master is let-bound


From: Christopher Schmidt
Subject: Re: [O] TeX-master: TeX-master is let-bound
Date: Fri, 25 Jan 2013 11:36:02 +0000 (GMT)

Bastien <address@hidden> writes:

Hi Bastien,

thanks for your reply.

> Christopher Schmidt <address@hidden> writes:
>> Christopher Schmidt <address@hidden> 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 <address@hidden>.  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 <address@hidden>) 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 via email to

[Prev in Thread] Current Thread [Next in Thread]