From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastian Beischer Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <87zivc45j5.fsf@gmail.com> <87d1s8kmyo.fsf@mail.linkov.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114080eaccdb31052b409317 X-Trace: ger.gmane.org 1454931318 26589 80.91.229.3 (8 Feb 2016 11:35:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Feb 2016 11:35:18 +0000 (UTC) Cc: 22589@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 08 12:35:11 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aSk63-0000tX-Cz for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Feb 2016 12:35:11 +0100 Original-Received: from localhost ([::1]:43732 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSk62-0004wj-PH for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Feb 2016 06:35:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42083) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSk5x-0004vK-U3 for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2016 06:35:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSk5u-00065F-O9 for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2016 06:35:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57704) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSk5u-000654-Ju for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2016 06:35:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aSk5u-0005ML-Fd for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2016 06:35:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Bastian Beischer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Feb 2016 11:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22589 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22589-submit@debbugs.gnu.org id=B22589.145493124920535 (code B ref 22589); Mon, 08 Feb 2016 11:35:02 +0000 Original-Received: (at 22589) by debbugs.gnu.org; 8 Feb 2016 11:34:09 +0000 Original-Received: from localhost ([127.0.0.1]:38060 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSk52-0005L9-Mm for submit@debbugs.gnu.org; Mon, 08 Feb 2016 06:34:08 -0500 Original-Received: from mail-lf0-f50.google.com ([209.85.215.50]:34303) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSk50-0005Kr-UY for 22589@debbugs.gnu.org; Mon, 08 Feb 2016 06:34:07 -0500 Original-Received: by mail-lf0-f50.google.com with SMTP id j78so93349213lfb.1 for <22589@debbugs.gnu.org>; Mon, 08 Feb 2016 03:34:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=6xj2Sa1LgwhHqG1/kvlB8swlFxzxDPx3IOiFwxBNPRQ=; b=dHuHUUXJ8TUlUagqqDMU3EtvLrriRCv58z2QZ+9KccXEVUMhyLL28ZkNPRIF7wv6lX 6TNgeTJIOJEpFdBw/tk0JD/pMneItAD333FMqaoaVQD45Chst1jG4+YT5LveWnNUhsbT jcTHyMt8n0jD536Lhg6mZ0RnM1NJWrK0KdLVshBrOpqwP0MN4Exy1eu72Vs5MfFO0qUZ V3YvFhM9G2IlqQ0LNbe81hF0QG+PrdVqMnBDHbDWY0pIoMxWxXqmXfgRRcpn/bJIf8xi FUasMF/tyWrg9KFkYS1HNnI1u6Hueqz/Bn/VoH4ykovCGouO3ryz/lwZZzrz8q6+7JrW JfeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=6xj2Sa1LgwhHqG1/kvlB8swlFxzxDPx3IOiFwxBNPRQ=; b=h3rlDIvaxwpT5fJrHXGjih6w6Ff+XGiYunQyOrsWhMssnpVb3M28BZQtOR176J6M65 RkJugsSZyEW05d1zlp4T+KcIT58PUqVj07M10myg0sAYsEV/Y9QOWRPaezwcrKsZZ3r7 g4WQ1PzzfAVUMx3kIyl0M2jeh7N2i5m6+c5zxU5ENtTTvMNQWTkORNXbrTDJlMI8RRLt SXRdBEf20m2uC+WPpn/YTlX5kxqevlO0BhBjbvB7lNzpfzPw63qSM4UESz1IVhDAoAVK vPhJkCbTD5qITqX7+vyKB1txyY2ePG62ocZWLBAwUqRZ5k7q+qtcFofYWUeiJl3gTV/5 Ng2w== X-Gm-Message-State: AG10YORxPL+qlTLNLWtn1UW+/ZcZH5LJPM+nUQUtoNL3sO1zTEP6k7JVP8lOtHSSxqbzW/4NSXHr/Mki6nzG9Q== X-Received: by 10.25.18.220 with SMTP id 89mr11483681lfs.127.1454931241127; Mon, 08 Feb 2016 03:34:01 -0800 (PST) Original-Received: by 10.25.205.81 with HTTP; Mon, 8 Feb 2016 03:34:01 -0800 (PST) In-Reply-To: <87d1s8kmyo.fsf@mail.linkov.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:112711 Archived-At: --001a114080eaccdb31052b409317 Content-Type: text/plain; charset=UTF-8 Hello Juri, On Mon, Feb 8, 2016 at 1:54 AM, Juri Linkov 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 "\_", 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 --001a114080eaccdb31052b409317 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello Juri,

On Mon, Feb 8, 2016 at 1:54 AM, Juri Linkov &l= t;juri@linkov.net&= gt; wrote:
> Instructions to re= produce:
>
> 1) emacs -Q
> 2) open a new file called "test.c"
> 3) enter this text:
>
> int main() {
>=C2=A0 =C2=A0int i =3D 0;
>=C2=A0 =C2=A0return 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 highlighte= d as a match
>=C2=A0 =C2=A0 =C2=A0 even though the first match should be "i"= ; in "int i =3D0".

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 outli= ned above is more severe.

For example: In this line:

unsigned int i =3D 0;

when searching for= the symbol "i". Taking your comment into account I can see why t= he first match would be "int", although that's actually not a= match for "\_<i\_>", because if we would match "i&quo= t; 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 &= quot;i" in unsIgned is matched, which is surely never going to be a sy= mbol...

--
Bastian Beischer
RWTH Aachen University of Technology<= br>
@CERN
Office: Bdg 32-4-B12
Phone: +41-22-76-75750
E-mail: <= a href=3D"mailto:bastian.beischer@cern.ch" target=3D"_blank">bastian.beisch= er@cern.ch
Address: CERN, CH-1211 Geneve 23

@RWTH Aachen
O= ffice: 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
--001a114080eaccdb31052b409317--