emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lazy-count-update-hook run with inconsistent point


From: Augusto Stoffel
Subject: Re: lazy-count-update-hook run with inconsistent point
Date: Fri, 25 Mar 2022 08:54:03 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.92 (gnu/linux)

Hi Jai,

On Fri, 25 Mar 2022 at 11:04, Jai Flack <jflack@disroot.org> wrote:

> What do you think about lazy-count-update-hook being run with
> inconsistent point? It's called from three points in isearch.el and from
> best I can tell, for two of those (in isearch-lazy-highlight-new-loop)
> it is always called with point at the current match (start or end
> depending on forward or reverse search); however the last call (in
> isearch-lazy-highlight-buffer-update) is inside the save-excursion and
> so the point is wherever the last overlay has been created.
>
> I can't see any reason for this inconsistency in the UI updating code
> (starting line 4338 on 392d66f6f5) so should this be moved outside the
> save-excursion or rather documented as unreliable?

It should be reliable.

> Note: my package can use isearch-match-data so this is just a minor
> implementation detail.

Anyway, that was an oversight.  Does the patch below solve the problem?

Attachment: 0001-Always-run-isearch-lazy-count-update-hook-with-point.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]