all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bastian Beischer <bastian.beischer@gmail.com>
To: Juri Linkov <juri@linkov.net>
Cc: 22589@debbugs.gnu.org
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	[thread overview]
Message-ID: <CAK9AuB_cmUGdP7O3Y0juMyiZo-zhXN3JJDC8sR1kQ9VziunHkA@mail.gmail.com> (raw)
In-Reply-To: <87d1s8kmyo.fsf@mail.linkov.net>

[-- Attachment #1: Type: text/plain, Size: 1716 bytes --]

Hello Juri,

On Mon, Feb 8, 2016 at 1:54 AM, Juri Linkov <juri@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@cern.ch
Address: CERN, CH-1211 Geneve 23

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

[-- Attachment #2: Type: text/html, Size: 2755 bytes --]

  parent reply	other threads:[~2016-02-08 11:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-07 20:41 bug#22589: 25.0.90; First match found by isearch-forward-symbol is not necessarily a symbol Bastian Beischer
2016-02-08  0:09 ` Bastian Beischer
2016-02-08  0:54 ` Juri Linkov
2016-02-08 11:30   ` Michael Heerdegen
2016-02-10  0:55     ` Juri Linkov
2016-02-10 11:30       ` Michael Heerdegen
2016-02-08 11:34   ` Bastian Beischer [this message]
2016-02-10  0:54     ` Juri Linkov
2017-02-05 23:39       ` Juri Linkov
2017-02-06 11:10         ` Michael Heerdegen
2017-02-07  0:11           ` Juri Linkov
2017-02-07 19:19             ` Michael Heerdegen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK9AuB_cmUGdP7O3Y0juMyiZo-zhXN3JJDC8sR1kQ9VziunHkA@mail.gmail.com \
    --to=bastian.beischer@gmail.com \
    --cc=22589@debbugs.gnu.org \
    --cc=juri@linkov.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.