bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#7534: 24.0.50; G-g within Isearch regexp mode


From: Juri Linkov
Subject: bug#7534: 24.0.50; G-g within Isearch regexp mode
Date: Thu, 02 Dec 2010 22:31:48 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)

> Recipe:
> 0) Start Emacs (-Q)
> 1) Place point at the beginning of the *scratch* buffer.
> 2) Search for the regexp "iss" (C-M-s iss) --> The last `s' is
> unmatched as expected, OK.
> 3) Type C-g --> The unmatched part disappears. Everything OK so far.
> 4) Now repeat steps #2 and #3 with the regexp "is[". --> This time C-g
> behaves differently. Instead of deleting the unmatched part, it ends
> Isearch mode.
>
> The fail seems to appear whenever `[' is the first character in the
> unmatched part. For instance:
>  * C-M-s iss[ C-g --> Works as expected (unmatched part deleted).
>  * C-M-s is[blablabla --> Doesn't work as expected (Isearch cancelled).

IMO, this is consistent behavior.  As the message says after typing `['
it's incomplete input, so C-g behaves exactly like if there is no input
for `[' (and an unfinished sequence of characters that follows it).

So the main principle here is that "incomplete input" means "no input"
for Isearch, and given this rule all your examples work as expected, i.e.

"C-M-s is[ C-g" works like "C-M-s is C-g"
"C-M-s iss[ C-g" works like "C-M-s iss C-g"
"C-M-s is[blablabla C-g" works like "C-M-s is C-g"





reply via email to

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