[Top][All Lists]

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

Re: `isearch-allow-scroll' - a misnomer and a bad design

From: Alan Mackenzie
Subject: Re: `isearch-allow-scroll' - a misnomer and a bad design
Date: Wed, 21 Sep 2011 09:04:06 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Hi, everybody.

On Tue, Sep 20, 2011 at 09:59:22PM +0200, Dani Moncayo wrote:
> > Since C-u is always a prefix character, would it make sense to you for
> > it not to quit isearch if the character that follows a C-u opt/number
> > prefix is a key sequence that is currently in use by isearch, and for it
> > to quit Isearch and pass the prefix on to the non-isearch command
> > otherwise?

> > In this case, `C-u C-n' would exit isearch and move down 4 lines, whereas
> > `C-u n' would add four "n"s to the current search string.

Since when has adding four identical characters into a search string been
useful?  Maybe "))))" whilst programming elisp, and there is a (long)
place name in Wales with four consecutive 'l's.  But really?  :-)

> FWIW: Several people have expressed this idea, with which I agree.
> C-u should do nothing by itself (and that includes not exiting
> Isearch, of course).

C-u is bound to a command, namely `universal-argument', and we do our
users a disservice if we try to pretend otherwise.

> Its only effect should be to provide a prefix argument to the next
> command, to extend its behavior.

No.  When in isearch, it first exits isearch and then generates the
prefix argument (4).  It exits isearch like (almost) any other
non-character keysequence does.

What is now going down is that C-u will _sometimes_ exit isearch,
sometimes not.  This is going to leave a squidgy uncomfortable feeling
in the stomach of anybody who thinks about it, yet hasn't explicitly
enabled this behaviour.

isearch-allow-scroll isn't enabled by default, so why should
isearch-enable-prefix, which is almost (but not quite) as radical a
departure from classical Emacs, be?

The anomaly we're stumbling over here is the (almost?) unique status of
isearch as a modal (in the vi sense) behaviour in Emacs.

> I hope it helps.

> -- 
> Dani Moncayo

Alan Mackenzie (Nuremberg, Germany).

reply via email to

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