>>>>> Tassilo Horn <t...@gnu.org> writes: > Ikumi Keita <ik...@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