* TeX-master: TeX-master is let-bound @ 2012-10-25 16:48 Christopher Schmidt 2012-10-25 21:45 ` Suvayu Ali 0 siblings, 1 reply; 32+ messages in thread From: Christopher Schmidt @ 2012-10-25 16:48 UTC (permalink / raw To: emacs-orgmode org-export-as-latex (org-latex.el) let-binds TeX-master. Later on feature tex may be loaded. This is a problem, because in that case the defvar TeX-master of tex (AUCTeX) is ignored. Warning: defvar ignored because TeX-master is let-bound This issue could be fixed by adding (require 'tex nil t). Christopher ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 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 0 siblings, 1 reply; 32+ messages in thread From: Suvayu Ali @ 2012-10-25 21:45 UTC (permalink / raw To: emacs-orgmode On Thu, Oct 25, 2012 at 05:48:57PM +0100, Christopher Schmidt wrote: > org-export-as-latex (org-latex.el) let-binds TeX-master. Later on > feature tex may be loaded. This is a problem, because in that case the > defvar TeX-master of tex (AUCTeX) is ignored. > > Warning: defvar ignored because TeX-master is let-bound > > This issue could be fixed by adding (require 'tex nil t). > What is your org-version? AFAIR, this was the case at the beginning of this year (Feb-March '12) but I do not think this is an issue anymore. -- Suvayu Open source is the future. It sets us free. ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2012-10-25 21:45 ` Suvayu Ali @ 2012-10-25 22:19 ` Christopher Schmidt 2012-10-26 6:51 ` Suvayu Ali 0 siblings, 1 reply; 32+ messages in thread From: Christopher Schmidt @ 2012-10-25 22:19 UTC (permalink / raw To: emacs-orgmode Suvayu Ali <fatkasuvayu+linux@gmail.com> writes: > On Thu, Oct 25, 2012 at 05:48:57PM +0100, Christopher Schmidt wrote: >> org-export-as-latex (org-latex.el) let-binds TeX-master. Later on >> feature tex may be loaded. This is a problem, because in that case >> the defvar TeX-master of tex (AUCTeX) is ignored. >> >> Warning: defvar ignored because TeX-master is let-bound >> >> This issue could be fixed by adding (require 'tex nil t). >> > > What is your org-version? AFAIR, this was the case at the beginning > of this year (Feb-March '12) but I do not think this is an issue > anymore. No, it is in both maint and master (org-latex.el:958) right now. To be honest, why is TeX-master exactly bound in the first place? (TeX-master (boundp 'TeX-master)) For the record, I use Org-mode version 7.9.2 (release_7.9.2-62-gde7766), that is maint from the 15th. of October. ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2012-10-25 22:19 ` Christopher Schmidt @ 2012-10-26 6:51 ` Suvayu Ali 2012-10-26 8:43 ` Christopher Schmidt 0 siblings, 1 reply; 32+ messages in thread From: Suvayu Ali @ 2012-10-26 6:51 UTC (permalink / raw To: emacs-orgmode On Thu, Oct 25, 2012 at 11:19:30PM +0100, Christopher Schmidt wrote: > Suvayu Ali <fatkasuvayu+linux@gmail.com> writes: > > On Thu, Oct 25, 2012 at 05:48:57PM +0100, Christopher Schmidt wrote: > >> org-export-as-latex (org-latex.el) let-binds TeX-master. Later on > >> feature tex may be loaded. This is a problem, because in that case > >> the defvar TeX-master of tex (AUCTeX) is ignored. > >> > >> Warning: defvar ignored because TeX-master is let-bound > >> > >> This issue could be fixed by adding (require 'tex nil t). > >> > > > > What is your org-version? AFAIR, this was the case at the beginning > > of this year (Feb-March '12) but I do not think this is an issue > > anymore. > > No, it is in both maint and master (org-latex.el:958) right now. To be > honest, why is TeX-master exactly bound in the first place? > > (TeX-master (boundp 'TeX-master)) > > For the record, I use Org-mode version 7.9.2 (release_7.9.2-62-gde7766), > that is maint from the 15th. of October. > I believe the reason was to get rid of auctex prompting for the master file name every time an org file is exported to LaTeX. -- Suvayu Open source is the future. It sets us free. ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2012-10-26 6:51 ` Suvayu Ali @ 2012-10-26 8:43 ` Christopher Schmidt 2012-10-26 9:30 ` Christopher Witte 2013-01-24 19:25 ` Christopher Schmidt 0 siblings, 2 replies; 32+ messages in thread From: Christopher Schmidt @ 2012-10-26 8:43 UTC (permalink / raw To: emacs-orgmode Suvayu Ali <fatkasuvayu+linux@gmail.com> writes: > I believe the reason was to get rid of auctex prompting for the master > file name every time an org file is exported to LaTeX. 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. Christopher ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 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 2013-01-24 19:25 ` Christopher Schmidt 1 sibling, 2 replies; 32+ messages in thread From: Christopher Witte @ 2012-10-26 9:30 UTC (permalink / raw To: emacs-orgmode It probably has something to do with this thread: http://lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg00473.html That thread was about auctex prompting for the master file name every time an org file is opened. On 26 October 2012 10:43, Christopher Schmidt <christopher@ch.ristopher.com> wrote: > Suvayu Ali <fatkasuvayu+linux@gmail.com> writes: >> I believe the reason was to get rid of auctex prompting for the master >> file name every time an org file is exported to LaTeX. > > 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. > > Christopher > ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2012-10-26 9:30 ` Christopher Witte @ 2012-10-26 11:41 ` Suvayu Ali 2012-10-26 15:34 ` Christopher Schmidt 1 sibling, 0 replies; 32+ messages in thread From: Suvayu Ali @ 2012-10-26 11:41 UTC (permalink / raw To: emacs-orgmode On Fri, Oct 26, 2012 at 11:30:17AM +0200, Christopher Witte wrote: > It probably has something to do with this thread: > http://lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg00473.html > > That thread was about auctex prompting for the master file name every > time an org file is opened. > Okay so I was a bit off about the reason; do you see any other ways to deal with this? -- Suvayu Open source is the future. It sets us free. ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 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> 1 sibling, 1 reply; 32+ messages in thread From: Christopher Schmidt @ 2012-10-26 15:34 UTC (permalink / raw To: emacs-orgmode Christopher Witte <chris@witte.net.au> writes: > It probably has something to do with this thread: > http://lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg00473.html I do not think so, latex export has nothing to do with reftex. This is the commit in questions http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=3007ddd1 and I am not exactly sure what's correct about the new form. The old one looks way better to me. Christopher ^ permalink raw reply [flat|nested] 32+ messages in thread
[parent not found: <christopher@ch.ristopher.com>]
* Re: TeX-master: TeX-master is let-bound [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 ` (3 subsequent siblings) 4 siblings, 1 reply; 32+ messages in thread From: Nick Dokos @ 2012-10-26 16:31 UTC (permalink / raw To: emacs-orgmode Christopher Schmidt <christopher@ch.ristopher.com> wrote: > Christopher Witte <chris@witte.net.au> writes: > > It probably has something to do with this thread: > > http://lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg00473.html > > I do not think so, latex export has nothing to do with reftex. This is > the commit in questions > > http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=3007ddd1 > > and I am not exactly sure what's correct about the new form. The old > one looks way better to me. > The more relevant thread I think is http://thread.gmane.org/gmane.emacs.orgmode/48512 In any case, if you can get rid of the let-bind (or the need to muck with TeX-master at all within org), without introducing a regression, we are all ears. Nick ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2012-10-26 16:31 ` Nick Dokos @ 2012-10-29 21:18 ` Christopher Schmidt 0 siblings, 0 replies; 32+ messages in thread From: Christopher Schmidt @ 2012-10-29 21:18 UTC (permalink / raw To: emacs-orgmode Nick Dokos <nicholas.dokos@hp.com> writes: > In any case, if you can get rid of the let-bind (or the need to muck > with TeX-master at all within org), without introducing a regression, > we are all ears. I think adding (require 'tex nil t) before the let form is a nice fix. IMO the situation ATM is pretty bad. If AUCTeX is not loaded pre export the missing variable definition breaks AUCTeX completely. Christopher ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound [not found] ` <christopher@ch.ristopher.com> 2012-10-26 16:31 ` Nick Dokos @ 2012-10-29 22:25 ` Nick Dokos 2012-10-29 22:57 ` Christopher Schmidt 2012-11-01 14:50 ` Christopher Schmidt 2012-10-29 23:25 ` Nick Dokos ` (2 subsequent siblings) 4 siblings, 2 replies; 32+ messages in thread From: Nick Dokos @ 2012-10-29 22:25 UTC (permalink / raw To: emacs-orgmode Christopher Schmidt <christopher@ch.ristopher.com> wrote: > Nick Dokos <nicholas.dokos@hp.com> writes: > > In any case, if you can get rid of the let-bind (or the need to muck > > with TeX-master at all within org), without introducing a regression, > > we are all ears. > > I think adding (require 'tex nil t) before the let form is a nice fix. > Not really: you end up pulling in auctex even if you are not going to use it. > IMO the situation ATM is pretty bad. If AUCTeX is not loaded pre export > the missing variable definition breaks AUCTeX completely. > What missing variable definition? By the time the export is finished, the let-bind is gone. There is no definition of TeX-master anywhere, just as if you never had org loaded: why should auctex object to that? So I don't understand why it would break: all the common scenarios that I have tried work with no problem for me. I can load an org file, export to latex, open the latex file (which loads auctex) and do auctex things to it. I don't get any error. What exactly do I have to do in order to break it? Nick ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2012-10-29 22:25 ` Nick Dokos @ 2012-10-29 22:57 ` Christopher Schmidt 2013-02-23 9:16 ` Bastien 2012-11-01 14:50 ` Christopher Schmidt 1 sibling, 1 reply; 32+ messages in thread From: Christopher Schmidt @ 2012-10-29 22:57 UTC (permalink / raw To: emacs-orgmode Nick Dokos <nicholas.dokos@hp.com> writes: > What missing variable definition? By the time the export is finished, > the let-bind is gone. There is no definition of TeX-master anywhere, > just as if you never had org loaded: why should auctex object to that? > > So I don't understand why it would break: all the common scenarios > that I have tried work with no problem for me. I can load an org file, > export to latex, open the latex file (which loads auctex) and do > auctex things to it. I don't get any error. What exactly do I have to > do in order to break it? In org-latex.el, within the binding: (if to-buffer (unless (eq major-mode 'latex-mode) (latex-mode)) (save-buffer)) Recipe: emacs -q # + AUCTeX C-x b rms RET M-x org-mode RET M-: (insert "a") RET C-x h M-x org-export-region-as-latex RET # In buffer *Org LaTeX Export* C-c C-c TeX-command-master: Symbol's value as variable is void: TeX-master Christopher ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2012-10-29 22:57 ` Christopher Schmidt @ 2013-02-23 9:16 ` Bastien 2013-02-23 14:32 ` Christopher Schmidt 0 siblings, 1 reply; 32+ messages in thread From: Bastien @ 2013-02-23 9:16 UTC (permalink / raw To: Christopher Schmidt; +Cc: emacs-orgmode Hi Christopher, Christopher Schmidt <christopher@ch.ristopher.com> writes: > In org-latex.el, within the binding: > > (if to-buffer > (unless (eq major-mode 'latex-mode) (latex-mode)) > (save-buffer)) The problem is not in master anymore, but we still need to fix it for maint, from which 7.9.4 will be released soon, and which will be part of Emacs 24.3. > Recipe: > > emacs -q # + AUCTeX > C-x b rms RET > M-x org-mode RET > M-: (insert "a") RET > C-x h > M-x org-export-region-as-latex RET > > # In buffer *Org LaTeX Export* > C-c C-c > > TeX-command-master: Symbol's value as variable is void: > TeX-master I still cannot reproduce this. I add AUCTeX from ELPA, then I emacs -Q and loaded autoload-auctex.el to make sure the autoloads were correct. I have this in my minimal config: (add-to-list 'auto-mode-alist '("\\.tex\\'" nil TeX-LaTeX-mode)) Even in this case, with Org from maint, C-c C-c in the temporary buffer returns an error about the buffer not associated with the file (which is what I expected), not an error about TeX-master. I've closely read the thread started by Tassilo, but I don't think we are in the same boat: this thread is about defvar'ing a variable that is currently let-bound, not about let-binding a variable that is otherwise defvar'ed. Please let me know if you have another recipe to reproduce the bug, I want to get rid of this issue before 7.9.4. Thanks, -- Bastien ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2013-02-23 9:16 ` Bastien @ 2013-02-23 14:32 ` Christopher Schmidt 2013-03-02 15:11 ` Bastien 0 siblings, 1 reply; 32+ messages in thread From: Christopher Schmidt @ 2013-02-23 14:32 UTC (permalink / raw To: emacs-orgmode Bastien <bzg@altern.org> writes: Hi Bastien, > The problem is not in master anymore, That's great! > I add AUCTeX from ELPA, then I emacs -Q and loaded autoload-auctex.el > to make sure the autoloads were correct. I can reproduce this. (Current maint, GNU Emacs 24.2.93.2) Did you push AUCTeX's directory in load-path? Does the docstring of latex-mode mention AUCTeX? > I have this in my minimal config: > > (add-to-list 'auto-mode-alist '("\\.tex\\'" nil TeX-LaTeX-mode)) That is not necessary. > Please let me know if you have another recipe to reproduce > the bug, I want to get rid of this issue before 7.9.4. Unfortunately I see is no other easy way to reproduce this. (I am fine with wontfix in maint.) Christopher ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2013-02-23 14:32 ` Christopher Schmidt @ 2013-03-02 15:11 ` Bastien 0 siblings, 0 replies; 32+ messages in thread From: Bastien @ 2013-03-02 15:11 UTC (permalink / raw To: Christopher Schmidt; +Cc: emacs-orgmode Hi Christopher, Christopher Schmidt <christopher@ch.ristopher.com> writes: > Unfortunately I see is no other easy way to reproduce this. Well, I doubt anyone will have time to reproduce this before Org 7.9.4 and I'd rather concentrate on Org 8.0 for now, so... > (I am fine with wontfix in maint.) ... most probably this will be a won't fix, yes. Thanks, -- Bastien ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2012-10-29 22:25 ` Nick Dokos 2012-10-29 22:57 ` Christopher Schmidt @ 2012-11-01 14:50 ` Christopher Schmidt 1 sibling, 0 replies; 32+ messages in thread From: Christopher Schmidt @ 2012-11-01 14:50 UTC (permalink / raw To: emacs-orgmode Nick Dokos <nicholas.dokos@hp.com> writes: Hi Nick, were you able to reproduce my problem? > Christopher Schmidt <christopher@ch.ristopher.com> wrote: > >> Nick Dokos <nicholas.dokos@hp.com> writes: >> > In any case, if you can get rid of the let-bind (or the need to >> > muck with TeX-master at all within org), without introducing a >> > regression, we are all ears. >> >> I think adding (require 'tex nil t) before the let form is a nice fix. >> > > Not really: you end up pulling in auctex even if you are not going to > use it. What do you think about (when to-buffer (let ((sym 'latex-mode)) (while (symbolp sym) (setq sym (symbol-function sym))) (when (eq (car-safe sym) 'autoload) (load (cadr sym) sym t t)))) ? Christopher ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound [not found] ` <christopher@ch.ristopher.com> 2012-10-26 16:31 ` Nick Dokos 2012-10-29 22:25 ` Nick Dokos @ 2012-10-29 23:25 ` Nick Dokos 2012-10-30 7:52 ` Christopher Schmidt 2012-10-30 17:45 ` Nick Dokos 2012-11-01 15:22 ` Nick Dokos 4 siblings, 1 reply; 32+ messages in thread From: Nick Dokos @ 2012-10-29 23:25 UTC (permalink / raw To: emacs-orgmode Christopher Schmidt <christopher@ch.ristopher.com> wrote: > Nick Dokos <nicholas.dokos@hp.com> writes: > > What missing variable definition? By the time the export is finished, > > the let-bind is gone. There is no definition of TeX-master anywhere, > > just as if you never had org loaded: why should auctex object to that? > > > > So I don't understand why it would break: all the common scenarios > > that I have tried work with no problem for me. I can load an org file, > > export to latex, open the latex file (which loads auctex) and do > > auctex things to it. I don't get any error. What exactly do I have to > > do in order to break it? > > In org-latex.el, within the binding: > > (if to-buffer > (unless (eq major-mode 'latex-mode) (latex-mode)) > (save-buffer)) > You mean that's where you get the error? > Recipe: > > emacs -q # + AUCTeX > C-x b rms RET > M-x org-mode RET > M-: (insert "a") RET > C-x h > M-x org-export-region-as-latex RET > > # In buffer *Org LaTeX Export* > C-c C-c > > TeX-command-master: Symbol's value as variable is void: TeX-master > > Christopher > I get latex errors saying it cannot find <none>.tex but no emacs errors: ,---- | ERROR: I can't find file `<none>.tex'. | | --- TeX said --- | ! I can't find file `<none>.tex'. | --- HELP --- | TeX can't find a file that it needs. If the name of the missing file | has the extension tex, then it is looking for an input file that you | specified---either your main file or another file inserted with an | \input or \include command. If the missing file has the extension sty | , then you have specified a nonexistent document style or style | option. `---- Org-mode version 7.9.2 (release_7.9.2-533-g07c889 @ /home/nick/elisp/org-mode/lisp/) GNU Emacs 24.2.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.4) of 2012-09-21 on alphaville Nick ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2012-10-29 23:25 ` Nick Dokos @ 2012-10-30 7:52 ` Christopher Schmidt 0 siblings, 0 replies; 32+ messages in thread From: Christopher Schmidt @ 2012-10-30 7:52 UTC (permalink / raw To: emacs-orgmode Nick Dokos <nicholas.dokos@hp.com> writes: Hi Nick, > Christopher Schmidt <christopher@ch.ristopher.com> wrote: > >> Nick Dokos <nicholas.dokos@hp.com> writes: >> > What missing variable definition? By the time the export is >> > finished, the let-bind is gone. There is no definition of >> > TeX-master anywhere, just as if you never had org loaded: why >> > should auctex object to that? >> > >> > So I don't understand why it would break: all the common scenarios >> > that I have tried work with no problem for me. I can load an org >> > file, export to latex, open the latex file (which loads auctex) and >> > do auctex things to it. I don't get any error. What exactly do I >> > have to do in order to break it? >> >> In org-latex.el, within the binding: >> >> (if to-buffer >> (unless (eq major-mode 'latex-mode) (latex-mode)) >> (save-buffer)) >> > > You mean that's where you get the error? No, this is where AUCTeX is loaded. >> Recipe: >> >> emacs -q # + AUCTeX >> C-x b rms RET >> M-x org-mode RET >> M-: (insert "a") RET >> C-x h Are you sure that (featurep 'tex) is nil at this point? >> M-x org-export-region-as-latex RET ... if it is nil, (latex-mode) should load AUCTeX, which ultimately breaks AUCTeX due to the ignored defvar. >> # In buffer *Org LaTeX Export* >> C-c C-c ... this is where I actually get this error: >> TeX-command-master: Symbol's value as variable is void: TeX-master > I get latex errors saying it cannot find <none>.tex but no emacs > errors: [...] > Org-mode version 7.9.2 (release_7.9.2-533-g07c889 @ /home/nick/elisp/org-mode/lisp/) > GNU Emacs 24.2.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.4) of 2012-09-21 on alphaville Org-mode version 7.9.2 (release_7.9.2-497-g8866f8) GNU Emacs 24.2.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) of 2012-10-29 Thank you for your help. Regards, Christopher ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound [not found] ` <christopher@ch.ristopher.com> ` (2 preceding siblings ...) 2012-10-29 23:25 ` Nick Dokos @ 2012-10-30 17:45 ` Nick Dokos 2012-10-30 19:01 ` Christopher Schmidt 2012-10-30 20:32 ` Sebastien Vauban 2012-11-01 15:22 ` Nick Dokos 4 siblings, 2 replies; 32+ messages in thread From: Nick Dokos @ 2012-10-30 17:45 UTC (permalink / raw To: emacs-orgmode Christopher Schmidt <christopher@ch.ristopher.com> wrote: > Nick Dokos <nicholas.dokos@hp.com> writes: > > Hi Nick, > > > Christopher Schmidt <christopher@ch.ristopher.com> wrote: > > > >> Nick Dokos <nicholas.dokos@hp.com> writes: > >> > What missing variable definition? By the time the export is > >> > finished, the let-bind is gone. There is no definition of > >> > TeX-master anywhere, just as if you never had org loaded: why > >> > should auctex object to that? > >> > > >> > So I don't understand why it would break: all the common scenarios > >> > that I have tried work with no problem for me. I can load an org > >> > file, export to latex, open the latex file (which loads auctex) and > >> > do auctex things to it. I don't get any error. What exactly do I > >> > have to do in order to break it? > >> > >> In org-latex.el, within the binding: > >> > >> (if to-buffer > >> (unless (eq major-mode 'latex-mode) (latex-mode)) > >> (save-buffer)) > >> > > > > You mean that's where you get the error? > > No, this is where AUCTeX is loaded. > > >> Recipe: > >> > >> emacs -q # + AUCTeX > >> C-x b rms RET > >> M-x org-mode RET > >> M-: (insert "a") RET > >> C-x h > > Are you sure that (featurep 'tex) is nil at this point? Yes. > > >> M-x org-export-region-as-latex RET > > ... if it is nil, (latex-mode) should load AUCTeX, which ultimately > breaks AUCTeX due to the ignored defvar. Not in my case: (latex-mode) loads the standard tex mode. How do you get auctex loaded? I thought it was a separate package that needs special initialization: (load "auctex.el" nil t t) is what the documentation says. And I have 11.86 which I believe is latest available, but I might be behind the times: I haven't worried about it in a few years. Nick ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2012-10-30 17:45 ` Nick Dokos @ 2012-10-30 19:01 ` Christopher Schmidt 2012-10-30 20:32 ` Sebastien Vauban 1 sibling, 0 replies; 32+ messages in thread From: Christopher Schmidt @ 2012-10-30 19:01 UTC (permalink / raw To: emacs-orgmode Nick Dokos <nicholas.dokos@hp.com> writes: > Not in my case: (latex-mode) loads the standard tex mode. How do you > get auctex loaded? I thought it was a separate package that needs > special initialization: (load "auctex.el" nil t t) is what the > documentation says. And I have 11.86 which I believe is latest > available, but I might be behind the times: I haven't worried about it > in a few years. I use the AUCTeX distribution provided by the GNU ELPA. By default ELPA packages are enabled after reading the init file and before running after-init-hook. FWIW if you start emacs with -q, you have to initialise ELPA packages manually via M-x package-initialize RET. Christopher ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 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 1 sibling, 1 reply; 32+ messages in thread From: Sebastien Vauban @ 2012-10-30 20:32 UTC (permalink / raw To: emacs-orgmode-mXXj517/zsQ Hi Nick, Nick Dokos wrote: > Not in my case: (latex-mode) loads the standard tex mode. How do you get > auctex loaded? I thought it was a separate package that needs special > initialization: (load "auctex.el" nil t t) is what the documentation says. > And I have 11.86 which I believe is latest available, but I might be behind > the times: I haven't worried about it in a few years. 11.86 is still the latest, dating back from one year or two, something like that. Regarding installing it, I have: --8<---------------cut here---------------start------------->8--- (add-to-list 'load-path "~/Downloads/emacs/site-lisp/auctex-11.86/lisp") (add-to-list 'load-path "~/Downloads/emacs/site-lisp/auctex-11.86/lisp/auctex") (when (locate-library "auctex") (load "auctex.el") t) --8<---------------cut here---------------end--------------->8--- But you must pay attention to the following: - (la)tex-mode :: default Emacs built-in (La)TeX mode - (La)TeX-mode :: AUCTeX (`LaTeX/P' in the modeline?) and AUCTeX aliases `(la)tex-mode' to `(La)TeX-mode'. Something very bad IMHO (having very different packages bound to the same name, but in a different capitalization) for the sake of simplicity... But, apart from that, it's a great package -- until you find out about Org ;-). Best regards, Seb -- Sebastien Vauban ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2012-10-30 20:32 ` Sebastien Vauban @ 2012-10-30 20:54 ` Nick Dokos 0 siblings, 0 replies; 32+ messages in thread From: Nick Dokos @ 2012-10-30 20:54 UTC (permalink / raw To: Sebastien Vauban; +Cc: emacs-orgmode Sebastien Vauban <wxhgmqzgwmuf@spammotel.com> wrote: > Hi Nick, > > Nick Dokos wrote: > > Not in my case: (latex-mode) loads the standard tex mode. How do you get > > auctex loaded? I thought it was a separate package that needs special > > initialization: (load "auctex.el" nil t t) is what the documentation says. > > And I have 11.86 which I believe is latest available, but I might be behind > > the times: I haven't worried about it in a few years. > > 11.86 is still the latest, dating back from one year or two, something like > that. > > Regarding installing it, I have: > > (add-to-list 'load-path "~/Downloads/emacs/site-lisp/auctex-11.86/lisp") > (add-to-list 'load-path "~/Downloads/emacs/site-lisp/auctex-11.86/lisp/auctex") > > (when (locate-library "auctex") > (load "auctex.el") t) > > But you must pay attention to the following: > > - (la)tex-mode :: default Emacs built-in (La)TeX mode > - (La)TeX-mode :: AUCTeX (`LaTeX/P' in the modeline?) > > and AUCTeX aliases `(la)tex-mode' to `(La)TeX-mode'. > > Something very bad IMHO (having very different packages bound to the same > name, but in a different capitalization) for the sake of simplicity... > Yes, but in order to get LaTeX-mode when you ask for latex-mode, auctex must already be loaded, otherwise emacs won't know about the alias. Not sure how Christopher Schmidt's initialization goes: he uses ELPA packages and something seems to go awry. > But, apart from that, it's a great package -- until you find out about Org ;-). > It's a great package even after you find out about Org :-) Nick ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound [not found] ` <christopher@ch.ristopher.com> ` (3 preceding siblings ...) 2012-10-30 17:45 ` Nick Dokos @ 2012-11-01 15:22 ` Nick Dokos 4 siblings, 0 replies; 32+ messages in thread From: Nick Dokos @ 2012-11-01 15:22 UTC (permalink / raw To: emacs-orgmode Christopher Schmidt <christopher@ch.ristopher.com> wrote: > Nick Dokos <nicholas.dokos@hp.com> writes: > > Hi Nick, > > were you able to reproduce my problem? > No - I didn't try to duplicate what ELPA does (or install through it): I just don't have the time for that. > > Christopher Schmidt <christopher@ch.ristopher.com> wrote: > > > >> Nick Dokos <nicholas.dokos@hp.com> writes: > >> > In any case, if you can get rid of the let-bind (or the need to > >> > muck with TeX-master at all within org), without introducing a > >> > regression, we are all ears. > >> > >> I think adding (require 'tex nil t) before the let form is a nice fix. > >> > > > > Not really: you end up pulling in auctex even if you are not going to > > use it. > > What do you think about > > (when to-buffer > (let ((sym 'latex-mode)) > (while (symbolp sym) > (setq sym (symbol-function sym))) > (when (eq (car-safe sym) 'autoload) > (load (cadr sym) sym t t)))) > Haven't even tried to decypher this yet, but I assume it makes your problem go away? I can try it with my setup and see if it causes any problems. Nick ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2012-10-26 8:43 ` Christopher Schmidt 2012-10-26 9:30 ` Christopher Witte @ 2013-01-24 19:25 ` Christopher Schmidt 2013-01-25 10:42 ` Bastien 2013-02-19 10:38 ` Christopher Schmidt 1 sibling, 2 replies; 32+ messages in thread From: Christopher Schmidt @ 2013-01-24 19:25 UTC (permalink / raw To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 818 bytes --] 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. 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. 2013-01-24 Christopher Schmidt <christopher@ch.ristopher.com> * org-latex.el (org-export-as-latex): Do not bind TeX-master. [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: Type: text/x-diff, Size: 949 bytes --] --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -964,7 +964,6 @@ When PUB-DIR is set, use this as the publishing directory." (concat filename ".tex") filename))) (auto-insert nil); Avoid any auto-insert stuff for the new file - (TeX-master (boundp 'TeX-master)) (buffer (if to-buffer (if (eq to-buffer 'string) (get-buffer-create "*Org LaTeX Export*") @@ -1105,9 +1104,11 @@ When PUB-DIR is set, use this as the publishing directory." (or (eq (char-before) ?\n) (insert ?\n)) + (when (and to-buffer + (not (derived-mode-p 'latex-mode))) + (latex-mode)) (run-hooks 'org-export-latex-final-hook) - (if to-buffer - (unless (eq major-mode 'latex-mode) (latex-mode)) + (unless to-buffer (save-buffer)) (org-export-latex-fix-inputenc) (run-hooks 'org-export-latex-after-save-hook) [-- Attachment #3: Type: text/plain, Size: 33 bytes --] Thank you, Christopher ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2013-01-24 19:25 ` Christopher Schmidt @ 2013-01-25 10:42 ` Bastien 2013-01-25 11:36 ` Christopher Schmidt 2013-02-19 10:38 ` Christopher Schmidt 1 sibling, 1 reply; 32+ messages in thread From: Bastien @ 2013-01-25 10:42 UTC (permalink / raw To: emacs-orgmode Hi Christopher, 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? > 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. Is it so? If yes, can we make a better patch? Thanks, -- Bastien ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2013-01-25 10:42 ` Bastien @ 2013-01-25 11:36 ` Christopher Schmidt 2013-01-26 13:54 ` Christopher Schmidt 0 siblings, 1 reply; 32+ messages in thread From: Christopher Schmidt @ 2013-01-25 11:36 UTC (permalink / raw To: emacs-orgmode 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 ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2013-01-25 11:36 ` Christopher Schmidt @ 2013-01-26 13:54 ` Christopher Schmidt 2013-01-26 14:20 ` Bastien 0 siblings, 1 reply; 32+ messages in thread From: Christopher Schmidt @ 2013-01-26 13:54 UTC (permalink / raw To: emacs-orgmode Christopher Schmidt <christopher@ch.ristopher.com> writes: > Bastien <bzg@altern.org> writes: >> 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. Christopher Schmidt <christopher@ch.ristopher.com> writes: > Recipe: > > emacs -q # + AUCTeX > C-x b rms RET > M-x org-mode RET > M-: (insert "a") RET > C-x h > M-x org-export-region-as-latex RET > > # In buffer *Org LaTeX Export* > C-c C-c > > TeX-command-master: Symbol's value as variable is void: TeX-master For the record, the first step of my recipe, "emacs -q # + AUCTeX", goes like this: $ cd /tmp $ export HOME=/tmp $ emacs -q --eval "(progn (package-refresh-contents) (package-install 'auctex) (kill-emacs))" $ emacs -q --eval "(package-initialize)" Is there anything I can do to help you to help me - i.e. fixing that bug upstream? Christopher ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2013-01-26 13:54 ` Christopher Schmidt @ 2013-01-26 14:20 ` Bastien 2013-01-26 14:28 ` Christopher Schmidt 0 siblings, 1 reply; 32+ messages in thread From: Bastien @ 2013-01-26 14:20 UTC (permalink / raw To: emacs-orgmode Christopher Schmidt <christopher@ch.ristopher.com> writes: > $ emacs -q --eval "(progn (package-refresh-contents) (package-install 'auctex) (kill-emacs))" I can't install auctex through package-install. Can you give more directions? Thanks, -- Bastien ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2013-01-26 14:20 ` Bastien @ 2013-01-26 14:28 ` Christopher Schmidt 2013-01-26 15:35 ` Bastien 0 siblings, 1 reply; 32+ messages in thread From: Christopher Schmidt @ 2013-01-26 14:28 UTC (permalink / raw To: emacs-orgmode Bastien <bzg@altern.org> writes: > Christopher Schmidt <christopher@ch.ristopher.com> writes: > >> $ emacs -q --eval "(progn (package-refresh-contents) (package-install 'auctex) (kill-emacs))" > > I can't install auctex through package-install. Why is that? What's failing? ( "export HOME=/tmp" makes Emacs use /tmp/.emacs.d as it's user-directory, forcing package.el to not touch your real configuration in ~/.emacs.d.) > Can you give more directions? There is nothing special about my AUCTeX installation. Vanilla AUCTeX should produce the same results. The only things one needs to take care of before executing my recipe is that AUCTeX is autoloaded but not loaded. Christopher ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2013-01-26 14:28 ` Christopher Schmidt @ 2013-01-26 15:35 ` Bastien 2013-01-26 16:23 ` Christopher Schmidt 0 siblings, 1 reply; 32+ messages in thread From: Bastien @ 2013-01-26 15:35 UTC (permalink / raw To: emacs-orgmode Hi Christopher, Christopher Schmidt <christopher@ch.ristopher.com> writes: > Bastien <bzg@altern.org> writes: >> Christopher Schmidt <christopher@ch.ristopher.com> writes: >> >>> $ emacs -q --eval "(progn (package-refresh-contents) (package-install 'auctex) (kill-emacs))" >> >> I can't install auctex through package-install. > > Why is that? What's failing? Generating autoloads for tex-jp.el... forward-sexp: Scan error: "Unbalanced parentheses", 8785, 28213 When compiling. I'm off for the week-end, I'll dig this further later on next week. -- Bastien ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2013-01-26 15:35 ` Bastien @ 2013-01-26 16:23 ` Christopher Schmidt 0 siblings, 0 replies; 32+ messages in thread From: Christopher Schmidt @ 2013-01-26 16:23 UTC (permalink / raw To: emacs-orgmode Bastien <bzg@altern.org> writes: > Generating autoloads for tex-jp.el... > forward-sexp: Scan error: "Unbalanced parentheses", 8785, 28213 > > When compiling. I have no idea. emacs-24 (GNU Emacs 24.2.90.1) works fine. > I'm off for the week-end, I'll dig this further later on next week. Thank you very much. Here is a minimal recipe that produces the effects of the bug. (progn (let ((TeX-master t)) ;; require external TeX library (defvar TeX-master nil) (defun TeX-func () TeX-master) ;; do stuff with TeX library ;; ... ) ;; now do other stuff with TeX library (TeX-func)) Christopher ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: TeX-master: TeX-master is let-bound 2013-01-24 19:25 ` Christopher Schmidt 2013-01-25 10:42 ` Bastien @ 2013-02-19 10:38 ` Christopher Schmidt 1 sibling, 0 replies; 32+ messages in thread From: Christopher Schmidt @ 2013-02-19 10:38 UTC (permalink / raw To: emacs-orgmode Over at emacs-devel Tassilo Horn hit on the very same problem. This is what Glenn said (<har4kdkrnv.fsf@fencepost.gnu.org>): Tassilo Horn wrote: > (let ((crm-separator ",")) > (require 'crm)) This is a long-standing issue. The only solution at the moment is "don't do that". Christopher ^ permalink raw reply [flat|nested] 32+ messages in thread
end of thread, other threads:[~2013-03-02 15:11 UTC | newest] Thread overview: 32+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.