bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#47599: 28.0.50; Feature request improve/update isearch


From: Gregory Heytings
Subject: bug#47599: 28.0.50; Feature request improve/update isearch
Date: Wed, 07 Apr 2021 17:58:13 +0000



Thanks, finally there is an option to avoid typing extra C-r.


:-)  And thanks for your feedback!


Is it possible to find a clearer name?
Maybe isearch-repeat-on-direction-change would be better with the prefix 'isearch-repeat-' to hint that it applies to the commands 'isearch-repeat-*'?


Done.


This breaks the following feature:

When isearch-forward is t:
- C-1 C-r moves to the previous match (like your patch does without 'C-1')
- C-2 C-r moves to the second previous match
- C-u -1 C-r moves to the next match
- C-u -2 C-r moves to the second next match

This is due to these lines in isearch-repeat-backward:

              ;; Reverse the direction back
              (isearch-repeat 'backward))
             (t
              ;; Take into account one iteration to reverse direction
              (when isearch-forward (setq count (1+ count)))

When the new option is non-nil, there is no need to increment 'count'.
Also the new option should be let-bound to nil around the call to
'(isearch-repeat 'backward)' above to just change the direction back
without moving to the next match.

The same applies to isearch-repeat-forward and when isearch-forward is nil.


Fixed, thank you!

Attachment: 0001-User-option-to-move-to-another-match-when-changing-d.patch
Description: Text Data


reply via email to

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