[Top][All Lists]

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

Re: Simple isearch concerns

From: Gregory Heytings
Subject: Re: Simple isearch concerns
Date: Sat, 10 Apr 2021 23:55:50 +0000

I get much better scrolling experience with these properties:

(put 'scroll-up-command 'isearch-motion
    '((lambda () (goto-char (window-end)) (recenter 1 t)) . forward))
(put 'scroll-down-command 'isearch-motion
    '((lambda () (goto-char (window-start)) (recenter -1 t)) . backward))

so only new unseen matches are highlighted.

Indeed, I tried them, and I agree with you that these properties give a better experience.

+        (when (and isearch-success (not isearch-motion-changes-direction))
+          (unless (eq direction current-direction)
+            (let ((isearch-repeat-on-direction-change nil))
+              (isearch-repeat current-direction))))

This 'isearch-repeat' is broken when the new option 'isearch-repeat-on-direction-change' is customized to t.


Also in this case the old commands isearch-beginning-of-buffer and isearch-end-of-buffer are broken too. Maybe you need to wrap their calls of 'isearch-repeat' with

   (let ((isearch-repeat-on-direction-change nil))
     (isearch-repeat 'forward arg))

Indeed, it is necessary to let-bind isearch-repeat-on-direction-change to nil there, like elsewhere. I attach a separate patch, because it's not related to the isearch-allow-motion patch.

Attachment: 0001-New-user-options-to-move-between-isearch-matches.patch
Description: Text Data

Attachment: 0001-Fix-behavior-of-isearch-beginning-end-of-buffer.patch
Description: Text Data

reply via email to

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