Paul Nelson <ultr...@gmail.com> writes:

> I think a fix would be to store the beginning of the region being
> previewed in a buffer-local variable and, if needed, bump the point
> when searching for where to place the overlay.  Details:
>
> - Add the following line somewhere in preview.el:
>   #+begin_src elisp
>   (defvar-local preview-region--begin nil "Start of region being processed.")
>   #+end_src
>
> - Add the following line to ~preview-region~, just before the
>   invocation of ~preview-generate-preview~:
>   #+begin_src elisp
>   (setq-local preview-region--begin begin)
>   #+end_src
>
> - Add this to ~preview-parse-messages~, just before the second ~cond~ block:
>   #+begin_src elisp
>   (when (< (point) preview-region--begin)
>     (goto-char preview-region--begin))
>   #+end_src
>
> I've made these changes in my local version and they have worked for
> me.

Hi Paul,

thanks for your report and the analysis.  Can you provide a patch for
this change?  We can then install it, if it still works for you and
you're happy with it.

Best, Arash



_______________________________________________
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex

Reply via email to