Re: Proposal to fix simultaneity (Re: Onwards to lexical binding (attempt 1))

2022-03-08 Thread Ikumi Keita
> Ikumi Keita writes: > Tassilo Horn writes: >>> I expect the attached patch addresses this issue. What do you think >>> about it? >> Yes, looks correct and simple enough. So I'm all in favor of it. > Thanks, I installed the change in the git repo. Sorry, this breaks region preview

Re: Proposal to fix simultaneity (Re: Onwards to lexical binding (attempt 1))

2022-02-25 Thread Ikumi Keita
> Tassilo Horn writes: >> I expect the attached patch addresses this issue. What do you think >> about it? > Yes, looks correct and simple enough. So I'm all in favor of it. Thanks, I installed the change in the git repo. Cheers, Ikumi Keita #StandWithUkraine #StopRussianAggression

Re: Proposal to fix simultaneity (Re: Onwards to lexical binding (attempt 1))

2022-02-25 Thread Tassilo Horn
Ikumi Keita writes: Hi Keita, > This is a continuation of 1.5-year old thread. Better late than never. :-) >>> 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. > > I expect the attached patch addresses this

Proposal to fix simultaneity (Re: Onwards to lexical binding (attempt 1))

2022-02-25 Thread Ikumi Keita
Hi Tassilo, This is a continuation of 1.5-year old thread. > Ikumi Keita writes: > Tassilo Horn writes: >> Ikumi Keita 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 >>>

Re: Onwards to lexical binding (attempt 1)

2020-11-06 Thread Ikumi Keita
> Tassilo Horn writes: > Ikumi Keita 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

Re: Onwards to lexical binding (attempt 1)

2020-11-05 Thread Tassilo Horn
Ikumi Keita writes: >> I think `preview-region' should bind TeX-current-process-region-p >> permanently by `setq', not `let', so that TeX-active-master returns >> intended file name even in process sentinels. > > This incident made me aware that it has been long that AUCTeX lost the >

Re: Onwards to lexical binding (attempt 1)

2020-11-04 Thread Ikumi Keita
Hello Tassilo and all, > Ikumi Keita writes: > It doesn't work for region preview. After Setting region on circ.tex and > C-c C-p C-r, I get error and in process buffer I find > Running `Preview-PDF2DSC' with ``pdf2dsc circ.pdf > circ.prv/tmpSYCDuG/preview.dsc'' > . Thus preview-latex

Re: Onwards to lexical binding (attempt 1)

2020-09-12 Thread Ikumi Keita
> Tassilo Horn writes: > Very good! I've also had the same idea just last night in order to get > that ugly 'TeX-active-master special case out of `TeX-expand-command'. > Please commit. Done.:-) Cheers, Ikumi Keita

Re: Onwards to lexical binding (attempt 1)

2020-09-12 Thread Tassilo Horn
Ikumi Keita writes: > I noticed a regression in TeX-command-expand. When the file name > contains spaces, "%o" is expanded to raw file name without suitable > quotes for shell. > > How about the attached patch? It also make "%o" expansion skip the > obtained file name. Evaluating

Re: Onwards to lexical binding (attempt 1)

2020-09-12 Thread Ikumi Keita
Hi Tassilo, I noticed a regression in TeX-command-expand. When the file name contains spaces, "%o" is expanded to raw file name without suitable quotes for shell. How about the attached patch? It also make "%o" expansion skip the obtained file name. Evaluating (TeX-command-expand "%o") no longer

Re: Onwards to lexical binding (attempt 1)

2020-09-11 Thread Tassilo Horn
Ikumi Keita writes: >> Right. preview-generate-preview used to do that, but that seems to >> be to late. So in the new version, I setq >> TeX-current-process-region-p before the calls to that and removed its >> region-p argument. New patch at the end of the mail. > > Thanks, now it functions

Re: Onwards to lexical binding (attempt 1)

2020-09-11 Thread Ikumi Keita
Hi Tassilo, > Tassilo Horn writes: > Right. preview-generate-preview used to do that, but that seems to be > to late. So in the new version, I setq TeX-current-process-region-p > before the calls to that and removed its region-p argument. New patch > at the end of the mail. Thanks, now

Re: Onwards to lexical binding (attempt 1)

2020-09-11 Thread Tassilo Horn
Ikumi Keita writes: > Oops, by similar reason, `preview-document' should bind > TeX-current-process-region-p to nil. Otherwise C-c C-p C-d just after > region preview doesn't work. Right. preview-generate-preview used to do that, but that seems to be to late. So in the new version, I setq

Re: Onwards to lexical binding (attempt 1)

2020-09-11 Thread Ikumi Keita
Hi Tassilo, > Tassilo Horn writes: >> I think `preview-region' should bind TeX-current-process-region-p >> permanently by `setq', not `let', so that TeX-active-master returns >> intended file name even in process sentinels. > Indeed, below is a patch which does that. It works for me as far

Re: Onwards to lexical binding (attempt 1)

2020-09-11 Thread Tassilo Horn
Ikumi Keita writes: Here's the patch which was empty yesterday where I actually do that. >>> >>> Thanks. I'll test it later, probably tommorow. > >> Great, thanks! > > It doesn't work for region preview. After Setting region on circ.tex > and C-c C-p C-r, I get error and in process

Re: Onwards to lexical binding (attempt 1)

2020-09-11 Thread Ikumi Keita
Hi Tassilo, > Tassilo Horn writes: >>> Here's the patch which was empty yesterday where I actually do that. >> >> Thanks. I'll test it later, probably tommorow. > Great, thanks! It doesn't work for region preview. After Setting region on circ.tex and C-c C-p C-r, I get error and in

Re: Onwards to lexical binding (attempt 1)

2020-09-10 Thread Tassilo Horn
Ikumi Keita writes: >> Yeah, but preview-latex can bind that itself. I mean, it has >> separate commands for preview document and preview region and then >> passes either TeX-master-file or TeX-region-file. So if it binds >> TeX-current-process-region-p itself and TeX-active-master is used >>

Re: Onwards to lexical binding (attempt 1)

2020-09-10 Thread Ikumi Keita
Hi Tassilo, > Tassilo Horn writes: > Yeah, but preview-latex can bind that itself. I mean, it has separate > commands for preview document and preview region and then passes either > TeX-master-file or TeX-region-file. So if it binds > TeX-current-process-region-p itself and

Re: Onwards to lexical binding (attempt 1)

2020-09-10 Thread Tassilo Horn
Ikumi Keita writes: > Understood. Preview-latex (and presumably some other parts of AUCTeX) > calls TeX-command-expand directly, which bypasses setting > TeX-current-process-region-p. Thus TeX-active-master doesn't work as > expected. Yeah, but preview-latex can bind that itself. I mean, it

Re: Onwards to lexical binding (attempt 1)

2020-09-10 Thread Ikumi Keita
> Ikumi Keita writes: > However, it seems that the first run of preview-latex on any region > fails. It must be my conceptual patch that is guilty for that. I haven't > looked into the actual codes yet, but my impression is that some kind of > initialization is required to fix this...

Re: Onwards to lexical binding (attempt 1)

2020-09-09 Thread Ikumi Keita
Hi Tassilo, > Tassilo Horn writes: > 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. Works fine for normal

Re: Onwards to lexical binding (attempt 1)

2020-09-09 Thread Arash Esbati
Hi Tassilo and Keita, Tassilo Horn writes: > Ikumi Keita writes: > >> 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

Re: Onwards to lexical binding (attempt 1)

2020-09-09 Thread Tassilo Horn
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") >>

Re: Onwards to lexical binding (attempt 1)

2020-09-06 Thread Tassilo Horn
Tassilo Horn writes: >> It's probably worth checking the failing tests, at least some of them >> are related. > > I was too chickenhearted to run the tests. I'll have a look at the > failing ones when I find some time. (Of course, everybody is welcomed > to clean up after me.) Should be fixed

Re: Onwards to lexical binding (attempt 1)

2020-09-05 Thread Arash Esbati
Hi Tassilo, Tassilo Horn writes: > Tassilo Horn writes: > >> We still have such issues in tex.el with the variable `file' and some >> others. > > I've done that now, too. I still can run LaTeX and call the Evince > viewer (TeX-evince-sync-view and TeX-pdf-tools-sync-view don't rely on >

Re: Onwards to lexical binding (attempt 1)

2020-09-05 Thread Ikumi Keita
> Tassilo Horn writes: >> Or it can just be >> (or TeX-exit-mark >> (make-marker)) >> for simplicity. > Right, just go ahead. ;-) Done. Bye, Ikumi Keita

Re: Onwards to lexical binding (attempt 1)

2020-09-05 Thread Tassilo Horn
Mosè Giordano writes: Mosè, > thank you so much for taking the time to look into this! Thanks for the compliments. :-) > Running `make check` locally on this branch I get > > SUMMARY OF TEST RESULTS > --- > Files examined: 13 > Ran 42 tests, 35 results as

Re: Onwards to lexical binding (attempt 1)

2020-09-05 Thread Tassilo Horn
Ikumi Keita writes: >> -- >> modified latex.el >> @@ -1316,9 +1316,9 @@ Just like array and tabular." >>(save-excursion >> (LaTeX-find-matching-begin) >> (end-of-line) >> -(let ((exit-mark (if (boundp

Re: Onwards to lexical binding (attempt 1)

2020-09-05 Thread Ikumi Keita
> Ikumi Keita writes: > By the way, I think this part should be improved: > -- > modified latex.el > @@ -1316,9 +1316,9 @@ Just like array and tabular." >(save-excursion > (LaTeX-find-matching-begin) >

Re: Onwards to lexical binding (attempt 1)

2020-09-05 Thread Mosè Giordano
Hi Tassilo, thank you so much for taking the time to look into this! Running `make check` locally on this branch I get SUMMARY OF TEST RESULTS --- Files examined: 13 Ran 42 tests, 35 results as expected, 4 unexpected, 3 skipped 2 files contained

Re: Onwards to lexical binding (attempt 1)

2020-09-05 Thread Ikumi Keita
Hi Tassilo, > Tassilo Horn writes: > I just did so (-> TeX-exit-mark), and also with last-optional-rejected > (-> TeX-last-optional-rejected). Inserting a parbox works again. :-) Now it works for me, too, thanks! By the way, I think this part should be improved:

Re: Onwards to lexical binding (attempt 1)

2020-09-05 Thread Tassilo Horn
Ikumi Keita writes: Hi Keita-san, >> I've done that now, too. I still can run LaTeX and call the Evince >> viewer (TeX-evince-sync-view and TeX-pdf-tools-sync-view don't rely >> on `file' anymore but use `TeX-active-master' as suggested by Al >> Haji-Ali), so it seems I haven't broken

Re: Onwards to lexical binding (attempt 1)

2020-09-05 Thread Ikumi Keita
Hi Tassilo, > Tassilo Horn writes: > I've done that now, too. I still can run LaTeX and call the Evince > viewer (TeX-evince-sync-view and TeX-pdf-tools-sync-view don't rely on > `file' anymore but use `TeX-active-master' as suggested by Al Haji-Ali), > so it seems I haven't broken

Re: Onwards to lexical binding (attempt 1)

2020-09-04 Thread Tassilo Horn
Tassilo Horn writes: > We still have such issues in tex.el with the variable `file' and some > others. I've done that now, too. I still can run LaTeX and call the Evince viewer (TeX-evince-sync-view and TeX-pdf-tools-sync-view don't rely on `file' anymore but use `TeX-active-master' as

Onwards to lexical binding (attempt 1)

2020-09-04 Thread Tassilo Horn
Hi all, on the new branch lexical-binding-attempt-1, I've squashed all "reference to free variable" warnings in latex.el and context.el by declaring them properly with defvars and with a prefix, and changing all users. This affects in latex.el LaTeX-done-mark LaTeX-level LaTeX-name