[Top][All Lists]

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

Re: Onwards to lexical binding (attempt 1)

From: Tassilo Horn
Subject: Re: Onwards to lexical binding (attempt 1)
Date: Wed, 09 Sep 2020 18:46:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Ikumi Keita <> writes:

Hi Chaps,

>>     Debugger entered--Lisp error: (void-function nil)
> [...]
>> This happens when I set `TeX-view-program-selection' which looks like
>> this in my init file:
>>     (setq TeX-view-program-selection '((output-pdf "SumatraPDF")
>>                                        (output-dvi "dviout")))
>> When commented out, AUCTeX uses the the default `start' entry on Windows
>> which works.  Can others reproduce this?
> Confirmed. Similar error occurs when I turn off TeX-PDF-mode and try
> to invoke xdvi for "View" command.
> When "View" command is issued, TeX-command-expand calls
> TeX-view-command-raw, which in turn calls TeX-command-expand with the
> second argument being nil. This second call of TeX-command-expand
> overwrites the dynamic scope variable TeX-file-fn with wrong value, so
> the error occurs after emacs continues the execution of the first
> TeX-command-expand.
> Attached is a conceptual patch to fix the problem.

I worked upon your patch and committed that.  Should work again.
TeX-file-fn is now gone and one should simply use `TeX-active-master' in
TeX-expand-list{,-builtin} where formally `file' (and then
`TeX-file-fn') has been used.

> I think that the second argument of TeX-command-expand is no longer
> necessary, thanks to the fine utility TeX-active-master.

Indeed.  Here is an untested patch which does that (all tests still
pass).  Since it also affects preview-latex which I did not test, I
haven't committed it yet.  If it works, could also be
changed to that preview-gs-file is no cons of (TeX-active-master . file)
where the car is unused anymore.


reply via email to

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