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

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

bug#22589: 25.0.90; First match found by isearch-forward-symbol is not n


From: Bastian Beischer
Subject: bug#22589: 25.0.90; First match found by isearch-forward-symbol is not necessarily a symbol.
Date: Mon, 8 Feb 2016 12:34:01 +0100

Hello Juri,

On Mon, Feb 8, 2016 at 1:54 AM, Juri Linkov <address@hidden> wrote:
> Instructions to reproduce:
>
> 1) emacs -Q
> 2) open a new file called "test.c"
> 3) enter this text:
>
> int main() {
>   int i = 0;
>   return 0;
> }
>
> 4) go to the beginning of the buffer
> 5) hit M-s _ and search for the symbol "i"
>
> ---> The very first character in "int main" is highlighted as a match
>      even though the first match should be "i" in "int i =0".

Please imagine that you need to search for the symbol "int"
(or any other symbol longer than the single-character "i").
How then you would be able to type the whole symbol "int"
if the search failed after typing the first character "i"
(or moved to the first occurrence of the symbol "i"
when you need to find the symbol "int")?

What you are saying makes sense, but the bug I outlined above is more severe.

For example: In this line:

unsigned int i = 0;

when searching for the symbol "i". Taking your comment into account I can see why the first match would be "int", although that's actually not a match for "\_<i\_>", because if we would match "i" directly, then there would be no way to go back to match "int" should the user enter more characters. However, what happens is that the "i" in unsIgned is matched, which is surely never going to be a symbol...

--
Bastian Beischer
RWTH Aachen University of Technology

@CERN
Office: Bdg 32-4-B12
Phone: +41-22-76-75750
E-mail: address@hidden
Address: CERN, CH-1211 Geneve 23

@RWTH Aachen
Office: 28 C 203
Phone: +49-241-80-27205
E-mail: address@hidden
Address: I. Physikalisches Institut B, Sommerfeldstr. 14, D-52074 Aachen

reply via email to

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