Al Haji-Ali <abdo.haji....@gmail.com> 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 be my preference (for example if the buframe code is
> too specific, at least the simpler 'after-string mode), if there's
> interest.

Yes, adding the code to AUCTeX would be great.  We have to sort out if
as an addition to preview.el or stand alone, but that's a minor issue.

FWIW, I like the buframe version much more than the 'after-string.  In
general, I don't see why we shouldn't add buframe.el to AUCTeX if we
need it as a general purpose library.  We also have texmathp.el, for
instance.

> In any case, I would like to reduce the amount of replicated/copied
> code in `preview-dvi` by advocating for some changes/fixes to be
> included in preview.el

That would be a good starting point.  Again, I hope Keita has some time
and energy to join that discussion.

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 preview update on change.
(add-hook 'LaTeX-mode-hook
          (lambda () (add-hook 'after-change-functions
                               #'preview-point-buf-change nil t)))
--8<---------------cut here---------------end--------------->8---

Is there a way to start the generation process upon visiting a file?  Or
am I missing something?

Best, Arash

Reply via email to