GNU bug report logs -
#22589
25.0.90; First match found by isearch-forward-symbol is not necessarily a symbol.
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hello Juri,
On Mon, Feb 8, 2016 at 1:54 AM, Juri Linkov <juri <at> linkov.net> 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: bastian.beischer <at> cern.ch
Address: CERN, CH-1211 Geneve 23
@RWTH Aachen
Office: 28 C 203
Phone: +49-241-80-27205
E-mail: beischer <at> physik.rwth-aachen.de
Address: I. Physikalisches Institut B, Sommerfeldstr. 14, D-52074 Aachen
[Message part 2 (text/html, inline)]
This bug report was last modified 8 years and 99 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.