GNU bug report logs - #62445
13.1.10; bug in preview-region applied to repeated math environments

Previous Next

Package: auctex;

Reported by: Paul Nelson <ultrono <at> gmail.com>

Date: Sat, 25 Mar 2023 16:16:01 UTC

Severity: normal

Found in version 13.1.10

Done: Arash Esbati <arash <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 62445 <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: Paul Nelson <ultrono <at> gmail.com>
Cc: 62445 <at> debbugs.gnu.org
Subject: Re: bug#62445: 13.1.10; bug in preview-region applied to repeated
 math environments
Date: Wed, 03 Apr 2024 20:33:24 +0200
Paul Nelson <ultrono <at> 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




This bug report was last modified 1 year and 100 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.