[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 16:49:13 +0300

> Date: Fri, 09 Apr 2021 13:26:09 +0000
> From: Gregory Heytings <gregory@heytings.org>
> cc: juri@linkov.net, spacibba@aol.com, emacs-devel@gnu.org
> > The issue is whether we need to change the direction as a side effect of 
> > isearch-beginning-of-buffer.  From my POV, this is unexpected. The 
> > direction should stay what it was before.
> Yes, I understand the issue, but disagree that it is unexpected.  Just try 
> it, replace:
> (isearch-repeat 'forward arg)))
> by:
> (isearch-repeat (if isearch-forward 'forward 'backward) arg)))
> in isearch-beginning-of-buffer, type C-r isearch M-s M-<, and you'll see 
> that on the contrary not changing the direction is unexpected, that 
> behavior can only be considered as a bug.

Why do you consider that behavior a bug?  If the user wants to change
the direction, he/she can do that any time.

> > Why do you think this is not what the user will expect?
> Because this is not what M-< = beginning-of-buffer does, and this is also 
> not what the docstring of isearch-beginning-of-buffer says: "Go to the 
> first occurrence of the current search string. Move point to the beginning 
> of the buffer and search forwards from the top."

I'm saying that the side effect of changing the search direction is a
mistake.  Fixing the documentation to describe the behavior is a
no-brainer, the main issue is what kind of behavior do we want in this

reply via email to

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