emacs-devel
[Top][All Lists]
Advanced

[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: Fri, 09 Apr 2021 11:27:41 +0000


I tend to agree with you, but I'm not sure. There is already an 'isearch-allow-scroll' and its corresponding 'isearch-scroll' property, which changes the behavior of motion commands: it becomes possible to scroll (recenter, scroll-up, scroll-down, ...) but without changing the current match. This patch does something related, but different: it becomes possible to scroll among the matches.

The "scroll" part is what I think needs to be amended: the commands you are affecting are not scroll commands, they are cursor motion commands.


Okay, so what you mean by "scroll" in this context is "change the visible portion of the buffer without moving the cursor". I think I understand your point, even though that's not what scroll-up-command and scroll-down-command do. Would "isearch-allow-motion" and the property "isearch-motion" be okay?


I don't understand: why are you wrapping the call with condition-case, in that case?


It's not necessary (but AFAIU it's harmless) for the four commands that are enabled by isearch-allow-motion, it is also not necessary for:

(put 'next-line 'isearch-match-scroll '(next-line . forward))

which will correctly wrap at EOB, but it necessary for:

(put 'previous-line 'isearch-match-scroll '(previous-line . backward))

For some reason, in this case if the error is not catched, Isearch does not wrap at BOB, but instead enters in a strange state where you can move the cursor around. This might be a bug that should be corrected instead of circumventing it by catching the error.



reply via email to

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