[Top][All Lists]

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

Re: Simple isearch concerns

From: Eli Zaretskii
Subject: Re: Simple isearch concerns
Date: Fri, 09 Apr 2021 15:45:00 +0300

> Date: Fri, 09 Apr 2021 11:27:41 +0000
> From: Gregory Heytings <gregory@heytings.org>
> cc: juri@linkov.net, spacibba@aol.com, emacs-devel@gnu.org
> > 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?

Yes, this is better.  Although perhaps the property and the variable
should have the same name.

> 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.

So I think we should first investigate why it happens with the last
snippet.  And if the conclusion is that condition-case is indeed
needed, we should explain the need in a comment there.


reply via email to

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