Re: Preview package plug and questions about implementation in preview.el

2025-09-17 Thread Arash Esbati
Ikumi Keita writes: > Ah, indeed. I'll delete it. πŸ™

Re: Preview package plug and questions about implementation in preview.el

2025-09-17 Thread Arash Esbati
Hi Al, Al Haji-Ali writes: > Yes of course. Happy to send it as patches. πŸ™ > Do you mean the bug-tracker rather than here? Yes, please. Then we have a number for each patch and can track it easier. > Also, I guess that would mean waiting until each patch is installed > before sending the ne

Re: Preview package plug and questions about implementation in preview.el

2025-09-15 Thread Ikumi Keita
Hi Arash, > Arash Esbati writes: >> PS: Any idea why preview.el is in .gitignore? > I'd say a leftover from the time when we had preview.el.in from which > preview.el was generated. I think we can delete that entry now. Keita? Ah, indeed. I'll delete it. Regards, Ikumi Keita #StandWithUk

Re: Preview package plug and questions about implementation in preview.el

2025-09-15 Thread Al Haji-Ali
Hello Arash, On 15/09/2025, Arash Esbati wrote: > Note the "ext:" part which can be important, I think. From the > docstring: Fixed. > > Which feedback is still pending? At any rate, for the way forward I > suggest you take the current state you have and send 6 distinct > format-patch change se

Re: Preview package plug and questions about implementation in preview.el

2025-09-15 Thread Arash Esbati
Hi Al, Al Haji-Ali writes: > I've implemented this idea (not requiring buframe until used). There's > one helper function that is specific to buframe > `preview-point--buframe` which uses four functions from the package, > and which are declared with arguments right before the definition of > th

Re: Preview package plug and questions about implementation in preview.el

2025-09-15 Thread Al Haji-Ali
Hello Ikumi and Arash, On 12/09/2025, Arash Esbati wrote: > ? I'm not sure if this is the most elegant solution, but it is what it > is. I've implemented this idea (not requiring buframe until used). There's one helper function that is specific to buframe `preview-point--buframe` which uses fou

Re: Preview package plug and questions about implementation in preview.el

2025-09-12 Thread Arash Esbati
Ikumi Keita writes: >> On 05/09/2025, Arash Esbati wrote: >> I agree with you regarding external dependencies. We can either: >> - include it in auctex, as I do in my current fork. That would be completely >> fine with me. >> - Have it as an ELPA package, and have code in auctex that makes use

Re: Preview package plug and questions about implementation in preview.el

2025-09-11 Thread Ikumi Keita
Hi Al, > Al Haji-Ali writes: > Not at all. Just to make sure, I forgot to mention that the value of > `preview-point` should be set before opening the tex file. OK, that was the culprit. Now it works as expected. > when I press C-c C-p C-d inside circ.tex, nothing appears until the > cursor

Re: Preview package plug and questions about implementation in preview.el

2025-09-10 Thread Al Haji-Ali
On 11/09/2025, Ikumi Keita wrote: > Now the behavior with the suggested config is similar to the current > standard preview-latex. That is, C-c C-p C-d turns the whole math > expressions and section headers in the buffers into images, where the > underlying LaTeX code appears only when the cursor

Re: Preview package plug and questions about implementation in preview.el

2025-09-10 Thread Ikumi Keita
Hi Al, > Al Haji-Ali writes: > I've now implemented everything over 6 commits (including the mentioned > refactoring) in my fork of auctex: > https://github.com/haji-ali/auctex/tree/preview-point Thank you. > The configuration is similar to before, but is more incremental. [...] > ;; For

Re: Preview package plug and questions about implementation in preview.el

2025-09-09 Thread Al Haji-Ali
Hello all, I've now implemented everything over 6 commits (including the mentioned refactoring) in my fork of auctex: https://github.com/haji-ali/auctex/tree/preview-point The configuration is similar to before, but is more incremental. --8<---cut here---start--

Re: Preview package plug and questions about implementation in preview.el

2025-09-07 Thread Arash Esbati
Ikumi Keita writes: >> Al Haji-Ali writes: >> >> I plan two other commits: >> - One to implement dvisvgm in preview.el: My approach will be to >> re-use the code of dvipng, but allow `preview-dvipng-command` to be >> a function so that it can construct the command of `dvisvgm`. There >>

Re: Preview package plug and questions about implementation in preview.el

2025-09-06 Thread Ikumi Keita
Hi Al, > Al Haji-Ali writes: > Thanks for this. Embarrassingly, I had some changes that I somehow > failed to push to the repo. Hence the discrepancy between our > experiences. > My apologies for the confusion, please pull the changes which should > have everything fixed now. Thank you, now

Re: Preview package plug and questions about implementation in preview.el

2025-09-04 Thread Al Haji-Ali
Hello Ikumi, On 04/09/2025, Ikumi Keita wrote: > Now preview-point sometimes > raises ghostscript error in circ.tex (after intentional error part) like Mmm.. That's gonna be annoying to debug because it seems to be working perfectly on my system and I couldn't break it (even starting from `emacs

Re: Preview package plug and questions about implementation in preview.el

2025-09-04 Thread Al Haji-Ali
Hello Ikumi, On 04/09/2025, Ikumi Keita wrote: >> Are you able to provide a recipe for this error at all? > > Sure. Thanks for this. Embarrassingly, I had some changes that I somehow failed to push to the repo. Hence the discrepancy between our experiences. My apologies for the confusion, please

Re: Preview package plug and questions about implementation in preview.el

2025-09-04 Thread Ikumi Keita
Hi Al, > Al Haji-Ali writes: > Mmm.. That's gonna be annoying to debug because it seems to be working > perfectly on my system and I couldn't break it (even starting from `emacs > -Q`). > Are you able to provide a recipe for this error at all? Sure. 1. Backup ~/.emacs.d/init.el and place

Re: Preview package plug and questions about implementation in preview.el

2025-09-03 Thread Ikumi Keita
Hi Al, > Al Haji-Ali writes: > That part is fixed now. Thank you so much for your intensive effort. Now preview-point sometimes raises ghostscript error in circ.tex (after intentional error part) like vv DviPS finished at Th

Re: Preview package plug and questions about implementation in preview.el

2025-09-03 Thread Al Haji-Ali
On 29/08/2025, Ikumi Keita wrote: > Thank you. It now works for the beginning portion of circ.tex as > expected. However, it still fails for the rest after this part: That part is fixed now. However, there are some lingering issues that I haven't been able to resolve. * dvisvgm failures are cata

Re: [some impressions] (was: Preview package plug and questions about implementation in preview.el)

2025-08-31 Thread Al Haji-Ali
Hello Uwe, On 31/08/2025, Uwe Brauer wrote: >> Hello Uwe, >> On 28/08/2025, Uwe Brauer wrote: > >> I was describing what the code is supposed to do, and what it currently does >> on my system. >> I am not quite sure of the reason why it doesn't work on your system. Is the >> config the followin

[some impressions] (was: Preview package plug and questions about implementation in preview.el)

2025-08-31 Thread Uwe Brauer
> Hello Uwe, > On 28/08/2025, Uwe Brauer wrote: > I was describing what the code is supposed to do, and what it currently does > on my system. > I am not quite sure of the reason why it doesn't work on your system. Is the > config the following? > (add-hook 'LaTeX-mode-hook > (lambda

Re: Preview package plug and questions about implementation in preview.el

2025-08-30 Thread Al Haji-Ali
Hello Ikumi, On 29/08/2025, Ikumi Keita wrote: > Thank you. It now works for the beginning portion of circ.tex as > expected. However, it still fails for the rest after this part: > % INTENTIONAL ERRORS! INTENTIONAL ERRORS! INTENTIONAL ERRORS! I am working on a solution to show an error symbol

Re: Preview package plug and questions about implementation in preview.el

2025-08-30 Thread Paul D. Nelson
> But I wanted to ask first if anyone knows how to generate previews without > surrounding whitespace (in the current preview code) with > preview-image-creator set to png or dvipng. > This seems to be the default for inline equations and when I use dvisvgm, but > not for display equations or fl

Re: Preview package plug and questions about implementation in preview.el

2025-08-30 Thread Al Haji-Ali
On 29/08/2025, Ikumi Keita wrote: > I suppose some treatment isn't working for circ.tex case. Can you look > into it? I believe I now fixed these issues. The old code did not handle all failures correctly. The auto preview code could use better handling of failures -- currently the output buff

Re: Preview package plug and questions about implementation in preview.el

2025-08-30 Thread Ikumi Keita
Hi Al, > Al Haji-Ali writes: > I believe I now fixed these issues. The old code did not handle all failures > correctly. Thank you. It now works for the beginning portion of circ.tex as expected. However, it still fails for the rest after this part: % INTENTIONAL ERRORS! INTENTIONAL ERRORS

Re: Preview package plug and questions about implementation in preview.el

2025-08-28 Thread Uwe Brauer
>>> "AE" == Arash Esbati writes: > Uwe Brauer writes: >> That is also my setting, but I have to insist >> I insert an equation via LaTeX-environment and preview presents just the >> equation number, when I start to add content to this equation it does >> not get previewed. > Can you come up wit

Re: Preview package plug and questions about implementation in preview.el

2025-08-28 Thread Ikumi Keita
Hi Al and all, > Al Haji-Ali writes: > I just made public an auctex preview package that I have been working on for > some time. It essentially shows the preview locally and temporarily in a > frame or as an 'after-string, similar to what Overleaf has been doing > recently. > https://gith

Re: Preview package plug and questions about implementation in preview.el

2025-08-28 Thread Uwe Brauer
>>> "AH" == Al Haji-Ali writes: > Hello Uwe, > On 28/08/2025, Uwe Brauer wrote: >> That is also my setting, but I have to insist >> I insert an equation via LaTeX-environment and preview presents just the >> equation number, when I start to add content to this equation it does >> not get previewe

Re: Preview package plug and questions about implementation in preview.el

2025-08-28 Thread Arash Esbati
Uwe Brauer writes: > That is also my setting, but I have to insist > I insert an equation via LaTeX-environment and preview presents just the > equation number, when I start to add content to this equation it does > not get previewed. Can you come up with a recipe how to reproduce this starting

Re: Preview package plug and questions about implementation in preview.el

2025-08-28 Thread Al Haji-Ali
Hello Uwe, On 28/08/2025, Uwe Brauer wrote: > That is also my setting, but I have to insist > I insert an equation via LaTeX-environment and preview presents just the > equation number, when I start to add content to this equation it does > not get previewed. I was describing what the code is sup

Re: Preview package plug and questions about implementation in preview.el

2025-08-28 Thread Uwe Brauer
>>> "AH" == Al Haji-Ali writes: >> In any event, as Uwe brings up in his responses, the stripped down >> approach means that new LaTeX code (created via ordinary typing, >> abbrevs, LaTeX-environment, copy/pasting from other files, ...) will not >> be previewed until the user runs one of the ordi

Re: Preview package plug and questions about implementation in preview.el

2025-08-28 Thread Al Haji-Ali
Hi Paul, First of all, thank you for taking the time to check the package and for your work on preview-auto. I would also be happy to work together on this to make it relevant for a larger part of the community. I just had an itch to see previews in a frame which resulted in this package. On 2

Re: Preview package plug and questions about implementation in preview.el

2025-08-28 Thread Paul D. Nelson
Al Haji-Ali writes: > On 27/08/2025, Uwe Brauer wrote: >> BTW have tried it out together with preview-auto (by Paul >> Nelson)? > > I have. I found preview-auto to be overly complicated and too prone to > fail in my tests, so I implemented my own automatic previewing > mechanism which turned out

Re: Preview package plug and questions about implementation in preview.el

2025-08-28 Thread Uwe Brauer
>>> "AH" == Al Haji-Ali writes: > On 28/08/2025, Uwe Brauer wrote: >> Well everything works fine, till the moment I add the new environment >> \begin{equation*} >> \int f dx=0 >> \end{equation*} >> >> This will then *not* displayed via preview, I have to run C-c C-p C-p >> again. >> >> BTW, ma

Re: Preview package plug and questions about implementation in preview.el

2025-08-28 Thread Al Haji-Ali
On 28/08/2025, Uwe Brauer wrote: > Well everything works fine, till the moment I add the new environment > \begin{equation*} > \int f dx=0 > \end{equation*} > > This will then *not* displayed via preview, I have to run C-c C-p C-p > again. > > BTW, may be the after-save-hook would be a better

Re: Preview package plug and questions about implementation in preview.el

2025-08-28 Thread Al Haji-Ali
On 28/08/2025, Uwe Brauer wrote: > Well everything works fine, till the moment I add the new environment > \begin{equation*} > \int f dx=0 > \end{equation*} > > This will then *not* displayed via preview, I have to run C-c C-p C-p > again. > > BTW, may be the after-save-hook would be a better ch

Re: Preview package plug and questions about implementation in preview.el

2025-08-27 Thread Uwe Brauer
>>> "AH" == Al Haji-Ali writes: > On 27/08/2025, Uwe Brauer wrote: >> I see, but if I add a new formula, I have to run preview-at-point again, >> right? > Not if you have the hook in 'after-change-functions to call > 'preview-point-buf-change > which is what this piece of configuration is doin

Re: Preview package plug and questions about implementation in preview.el

2025-08-27 Thread Al Haji-Ali
> I wasn't able to get it to work. I have dvisvgm installed. I tried > with the standard config, with dvipng, etc. preview-point-buf-change is > called, but no buffer frames appear. When I get the chance, I'll try > starting from a naked config and see if it works then. Hmmm.. I am not sure

Re: Preview package plug and questions about implementation in preview.el

2025-08-27 Thread Arash Esbati
Ikumi Keita writes: > OK, I try to find time to follow up this topic😊 Thanks Keita, much obliged. Best, Arash

Re: Preview package plug and questions about implementation in preview.el

2025-08-27 Thread Paul D. Nelson
Hi Al, > I just made public an auctex preview package that I have been working on for > some time. It essentially shows the preview locally and temporarily in a > frame or as an 'after-string, similar to what Overleaf has been doing > recently. > > https://github.com/haji-ali/preview-point > >

Re: Preview package plug and questions about implementation in preview.el

2025-08-27 Thread Ikumi Keita
> Arash Esbati writes: > That would be a good starting point. Again, I hope Keita has some time > and energy to join that discussion. OK, I try to find time to follow up this topic😊 Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine #Gaza #StopMassiveKilling #CeasefireNOW

Re: Preview package plug and questions about implementation in preview.el

2025-08-27 Thread Uwe Brauer
>>> "AH" == Al Haji-Ali writes: > On 27/08/2025, Arash Esbati wrote: >> Meanwhile, we can wait and see what others say. One thing occurred to >> me is that whole machinery kicks in once the buffer is changed due to >> this, I think: >> >> --8<---cut here---start---

Re: Preview package plug and questions about implementation in preview.el

2025-08-27 Thread Al Haji-Ali
On 27/08/2025, Arash Esbati wrote: > Meanwhile, we can wait and see what others say. One thing occurred to > me is that whole machinery kicks in once the buffer is changed due to > this, I think: > > --8<---cut here---start->8--- > ;; Enable automatic previe

Re: Preview package plug and questions about implementation in preview.el

2025-08-27 Thread Arash Esbati
Al Haji-Ali writes: > Indeed, that's the main reason I haven't used the preview package as > much. I am now using it more as part of my workflow. πŸ‘ > Thanks Arash! I've pushed the changes that you suggested. πŸ™ > I am happy for either option. Including it or parts of it in > preview.el would b

Re: Preview package plug and questions about implementation in preview.el

2025-08-27 Thread Uwe Brauer
>>> "AH" == Al Haji-Ali writes: > On 27/08/2025, Arash Esbati wrote: >> many thanks for creating and sharing this. I'm not a heavy >> preview-latex user, but I do like your approach since I tend to look at >> code at all the time, so your `buframe' version matches my workflow >> more. > Indeed,

Re: Preview package plug and questions about implementation in preview.el

2025-08-27 Thread Al Haji-Ali
On 27/08/2025, Arash Esbati wrote: > many thanks for creating and sharing this. I'm not a heavy > preview-latex user, but I do like your approach since I tend to look at > code at all the time, so your `buframe' version matches my workflow > more. Indeed, that's the main reason I haven't used t

Re: Preview package plug and questions about implementation in preview.el

2025-08-27 Thread Arash Esbati
Hi Al, Al Haji-Ali writes: > I just made public an auctex preview package that I have been working > on for some time. It essentially shows the preview locally and > temporarily in a frame or as an 'after-string, similar to what > Overleaf has been doing recently. > > https://github.com/haji-ali

Re: Preview package plug and questions about implementation in preview.el

2025-08-26 Thread Al Haji-Ali
On 26/08/2025, Uwe Brauer wrote: >> That was the point I missed, now it works, thanks. > >> One question, how can I change the size of the superimposed snippets. > > I changed the setting of preview-scale-function > which is better suited for my 14 inch Laptop Ah good to know. I'll remove that cu

Re: Preview package plug and questions about implementation in preview.el

2025-08-26 Thread Uwe Brauer
> That was the point I missed, now it works, thanks. > One question, how can I change the size of the superimposed snippets. I changed the setting of preview-scale-function which is better suited for my 14 inch Laptop smime.p7s Description: S/MIME cryptographic signature

Re: Preview package plug and questions about implementation in preview.el

2025-08-26 Thread Uwe Brauer
>>> "AH" == Al Haji-Ali writes: > Hello Uwe, > On 26/08/2025, Uwe Brauer wrote: >>> I am on Emacs 29.4 >>> I cloned the repository >>> I set the path to that directory >> >>> I byte compiled all 3 files >> >>> Here is what I obtained. > Thanks for these. I admit I forgot to check warnings in

Re: Preview package plug and questions about implementation in preview.el

2025-08-26 Thread Al Haji-Ali
Hello Uwe, On 26/08/2025, Uwe Brauer wrote: >> I am on Emacs 29.4 >> I cloned the repository >> I set the path to that directory > >> I byte compiled all 3 files > >> Here is what I obtained. Thanks for these. I admit I forgot to check warnings in byte-compilation. These should be all fixed now.

Re: Preview package plug and questions about implementation in preview.el

2025-08-26 Thread Uwe Brauer
>>> "AH" == Al Haji-Ali writes: > I just made public an auctex preview package that I have been working > on for some time. It essentially shows the preview locally and > temporarily in a frame or as an 'after-string, similar to what > Overleaf has been doing recently. > https://github.com/haji-

Re: Preview package plug and questions about implementation in preview.el

2025-08-26 Thread Uwe Brauer
>>> "UB" == Uwe Brauer writes: >>> "AH" == Al Haji-Ali writes: >> I just made public an auctex preview package that I have been working >> on for some time. It essentially shows the preview locally and >> temporarily in a frame or as an 'after-string, similar to what >> Overleaf has been doing r

Preview package plug and questions about implementation in preview.el

2025-08-26 Thread Al Haji-Ali
I just made public an auctex preview package that I have been working on for some time. It essentially shows the preview locally and temporarily in a frame or as an 'after-string, similar to what Overleaf has been doing recently. https://github.com/haji-ali/preview-point Any feedback/bug repo