emacs-devel
[Top][All Lists]
Advanced

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

Re: isearch-yank-char


From: Alan Mackenzie
Subject: Re: isearch-yank-char
Date: Fri, 30 Apr 2004 08:31:32 +0000 (GMT)


On 29 Apr 2004, Karl Fogel wrote:

>This thread hasn't actually arrived at a decision yet; let's see if we
>can reach one.  Proposal:

>   1. Bind C-f in isearch-mode to 'isearch-yank-char'.
>      (And while we're at it, fix isearch-yank-char's doc string to
>      say "char" instead of "letter".)

Excellent idea!  Let's do it!

>   2. Bind C-b in isearch-mode to a function (name TBD) that loses
>      one char from the search string.

NOT SO FAST!  Tell me, where does point get left after a C-b?  Normally,
one character backwards.  No problem.  But....

Where does point get left in a regexp-search after C-b?  Suppose that the
last character entered into the regexp search string was a closing
parenthesis (or whatever) that caused the the regexp search to backtrack,
moving point to an earlier position?  I can think of several ideas for
handling this, e.g.:

(i) Point moves _forward_ to where it was before the ] was entered, i.e.
C-b works just like <del> in this case;  However, the search string might
just have been extended by several characters at once (with M-y).  This
looks like getting hairy;

(ii) C-b only works in normal (non-regexp) search;

(iii) C-b is disallowed in regexp-search for quirky characters like );

(iv) C-b is disallowed in regexp-search whenever it would cause point to
jump forward;

(v) Point is left where it was, and the currently highlighted "match" is
no longer a match at all;

(vi) C-b in such circumstances acts like M-e, leaving the user directly
editing the search string.

I think it would be a good idea to resolve this issue before implementing
a C-b.  I'm not sure whether I'd rather do without C-b here than have
some ugly inconsistency, even if that inconsistency only appears in
marginal circumstances.

>Retreats into the night, watching, waiting,...
>-Karl

-- 
Alan Mackenzie (Munich, Germany)







reply via email to

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