all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Augusto Stoffel <arstoffel@gmail.com>
Cc: Jai Flack <jflack@disroot.org>,
	Philip Kaludercic <philipk@posteo.net>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	emacs-devel@gnu.org
Subject: Re: lazy-count-update-hook run with inconsistent point
Date: Fri, 25 Mar 2022 10:36:37 +0200	[thread overview]
Message-ID: <86wngimnbm.fsf@mail.linkov.net> (raw)
In-Reply-To: <87bkxuqxgk.fsf@gmail.com> (Augusto Stoffel's message of "Fri, 25 Mar 2022 08:54:03 +0100")

>> 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.
> ...
> Anyway, that was an oversight.  Does the patch below solve the problem?
> ...
> @@ -4342,11 +4342,12 @@ isearch-lazy-highlight-buffer-update
>  		  (setq isearch-lazy-count-current
>  			(gethash opoint isearch-lazy-count-hash 0))
>                    (when (and isearch-mode (null isearch-message-function))
> -                    (isearch-message))
> -		  (run-hooks 'lazy-count-update-hook))
> +                    (isearch-message)))
>  	      (setq isearch-lazy-highlight-timer
>  		    (run-at-time lazy-highlight-interval nil
> -				 'isearch-lazy-highlight-buffer-update)))))))))
> +				 'isearch-lazy-highlight-buffer-update)))))
> +        (when nomore
> +          (run-hooks 'lazy-count-update-hook))))))

Running the hook was also under another condition:
`(when isearch-lazy-count ...)'.  Shouldn't it be added
to `(when nomore ...)' too?



  reply	other threads:[~2022-03-25  8:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23 11:56 [NonGNU] New package: ctrlf and Questions jflack
2022-02-23 18:33 ` Augusto Stoffel
2022-02-23 19:40   ` Philip Kaludercic
2022-02-23 20:59     ` Augusto Stoffel
2022-02-24 10:36       ` Jai Flack
2022-02-26 11:02         ` Augusto Stoffel
2022-02-27  4:02           ` Stefan Monnier
2022-03-16 11:37             ` Overlay count for isearch (Was: [NonGNU] New package: ctrlf and Questions) Jai Flack
2022-03-16 12:00               ` Overlay count for isearch Augusto Stoffel
2022-03-18  2:45                 ` Jai Flack
2022-03-18  8:21                   ` Philip Kaludercic
2022-03-24  1:22                     ` Jai Flack
2022-03-24  8:31                       ` Juri Linkov
2022-03-25  1:04                         ` lazy-count-update-hook run with inconsistent point (Was: Overlay count for isearch) Jai Flack
2022-03-25  7:54                           ` lazy-count-update-hook run with inconsistent point Augusto Stoffel
2022-03-25  8:36                             ` Juri Linkov [this message]
2022-03-25  9:48                               ` Augusto Stoffel
2022-03-27  5:24                                 ` Jai Flack
2022-03-27  7:48                                 ` Juri Linkov
2022-03-26  3:28                       ` Overlay count for isearch Richard Stallman
2022-03-27  5:03                         ` Jai Flack
2022-03-05  4:39           ` [NonGNU] New package: ctrlf and Questions Jai Flack

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86wngimnbm.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=arstoffel@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=jflack@disroot.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=philipk@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.