auctex-devel
[Top][All Lists]
Advanced

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

Re: Onwards to lexical binding (attempt 1)


From: Ikumi Keita
Subject: Re: Onwards to lexical binding (attempt 1)
Date: Sat, 07 Nov 2020 00:07:52 +0900

>>>>> Tassilo Horn <tsdh@gnu.org> writes:
> Ikumi Keita <ikumi@ikumi.que.jp> writes:
>> The reason is that sentinel functions `TeX-LaTeX-sentinel' and those in
>> preview.el call `TeX-active-master', which depends on the global dynamic
>> scope variable 'TeX-current-process-region-p'. Suppose that Alice types
>> C-c C-c in a fairly large document.  The LaTeX process takes, say, 20
>> seconds or more. Before it finishes, Alice spans a region in the buffer
>> and types C-c C-r.
>> Then 'TeX-current-process-region-p' is overwritten by that C-c C-r, thus
>> `TeX-master-file', called in the process sentinel of the first process
>> invoked by C-c C-c, doesn't work as expected.

> Hm, isn't it actually even worse, i.e., Alice could compile one large
> document and then compile/preview a region in some completely different
> document?  AFAICS, `TeX-current-process-region-p' isn't even
> buffer-local which would at least help with the "different documents"
> case.

Yes, I agree with you.

> Well, if we've had that working at some point in time, I'd say it would
> be good if we could restore that.

> But how did it work?  I mean, the sentinel function runs much later
> outside of the dynamic scope of the command starting the process.

I guess that in early stage of development, sentinel functions were
simple enough to be free of TeX-active-master, including implicit
dependence through other functions.

>> On the other hand, if this problem must be considered as a serious
>> defect, then we should turn 'TeX-current-process-region-p' into a kind
>> of "process local variable" like `TeX-command-next'.

> I'd say it's not serious but we should address it anyway, and making it
> local in the process buffer seems like a suitable approach.

Sounds reasonable. How do others think?

Regards,
Ikumi Keita



reply via email to

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