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

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

bug#17533: 24.4.50; Word Isearch bug


From: Dani Moncayo
Subject: bug#17533: 24.4.50; Word Isearch bug
Date: Wed, 21 May 2014 12:50:17 +0200

On Wed, May 21, 2014 at 12:07 PM, Dani Moncayo <dmoncayo@gmail.com> wrote:
>> In word search mode, non-word characters are interpreted as whitespace.
>
> IMO, that rule should have an exception: the characters in the current
> search string should be interpreted as word characters (for the
> purpose of the search), because IMO, what the user wants is to search
> for occurrences of _that_ string (regardless of the type of its
> characters), where the _surrounding_ characters are non-words.

Though admittedly, it's a bit odd to put non-word characters in a
word-type Isearch.

My use case is this: I was editing a C source code file, which had
things like: "pointer->foo", "pointer->foobar", and also stand-alone
variables "foo" and "foobar".

I wanted to find only the occurrences of "pointer->foo", so I tried to
do a word-type Isearch with "->foo" as search string.

Therefore, I think that I intuitively expected the following behavior
for word-type Isearch: find matches of (literally) the search string
which have a "change in type of character" in its boundaries, i.e.:

1. If the first character in my search string is word-type, its
previous character in the buffer must be non-word-type (and vice-versa).

2. If the last character in my search string is word-type, its
following character in the buffer must be non-word-type (and vice-versa).



-- 
Dani Moncayo





reply via email to

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