GNU bug report logs - #17533
24.4.50; Word Isearch bug

Previous Next

Package: emacs;

Reported by: Dani Moncayo <dmoncayo <at> gmail.com>

Date: Tue, 20 May 2014 08:31:02 UTC

Severity: normal

Found in version 24.4.50

Done: Dani Moncayo <dmoncayo <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Juri Linkov <juri <at> jurta.org>
Cc: 17533 <at> debbugs.gnu.org
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 <at> 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




This bug report was last modified 11 years and 62 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.