emacs-devel
[Top][All Lists]
Advanced

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

Re: highlight failed part of isearch input


From: Juri Linkov
Subject: Re: highlight failed part of isearch input
Date: Fri, 13 Jul 2007 02:16:35 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

>     I notice something that strikes me as perhaps a bug, but I don't know 
> which
>     behavior was intended by `C-M-w'. If you use `C-s abx C-a' in a buffer 
> with
>     only `abcd', and then you use `C-s C-s C-M-w', the search string is 
> changed
>     from `abx' to `ab', but the prompt/echo still says "Failing", which is not
>     really correct. In fact, it has not yet searched again with the updated
>     search string from `C-M-w' - you must hit `C-s' again to start the search
>     (which does not fail).
>
> Given that it doesn't search again, the prompt may not be a bug.
> But the interface is definitely confusing.
>
> Juri Linkov is the author of this command.
> Juri, is there a reason it should work the way it does?

Semantically `isearch-del-char' should be equivalent to putting the search
string in the minibuffer for editing (`isearch-edit-string'), deleting the
last character in the minibuffer, exiting the minibuffer, and resuming the
search (i.e. three-key sequence `M-e DEL RET').

Using the Drew's test case (in a buffer containing text "abcd" type
`C-s abx M-e DEL RET') yields the same result - the minibuffer says
"Failing I-search".

It's even worse: in `isearch-edit-string' (unlike `isearch-yank-char')
adding the same characters that are under cursor to the search string
in the minibuffer, the resumed search can't find them (test case: in
a buffer containing text "abcd" type `C-s ab M-e cd C-s').  The result
is "Failing I-search".

I think we should try to find a proper place in low-level isearch
functions to fix such behavior, because for users it is confusing.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

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