GNU bug report logs - #78074
isearch not respecting point when changing direction after scrolling

Previous Next

Package: emacs;

Reported by: Jake <jforst.mailman <at> gmail.com>

Date: Sat, 26 Apr 2025 16:29:02 UTC

Severity: normal

Fixed in version 31.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Jake <jforst.mailman <at> gmail.com>
Cc: 78074 <at> debbugs.gnu.org
Subject: bug#78074: isearch not respecting point when changing direction after scrolling
Date: Mon, 28 Apr 2025 18:12:46 +0300
> 1. emacs -Q
> 2. M-: (setq isearch-allow-scroll 'unlimited)
> 3. M-: (setq isearch-repeat-on-direction-change t)
> 3. we need enough text in the buffer to be able to scroll, so C-x h M-w C-y
> several times.
> 3. At some point A, start a search with C-s.
> 4. Use C-v and/or M-v any number of times to move the point while remaining
> in isearch-mode.
> 5. C-s will move to the next match after point, but using C-r instead will
> move to the first match before point A.
>
> I think in this situation C-r should move to the first match before the
> current point, instead of the first match before the point where
> isearch-forward was last invoked.
>
> Likewise starting with isearch-backward: after using C-r then C-v/M-v, C-s
> matches the first occurrence after the point where C-r was last invoked,
> instead of the first occurrence after the current point.
>
> I think this is a bug because it doesn't happen when
> `isearch-repeat-on-direction-change' has its default value of nil.

Thanks for the bug report.  Maybe we don't need these lines
in 'isearch-repeat' after all:

    (if (and isearch-other-end isearch-repeat-on-direction-change)
        (goto-char isearch-other-end))

Could you please try to remove these 2 lines and see whether this
improves the behavior of changing the direction.




This bug report was last modified 23 days ago.

Previous Next


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