From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.devel Subject: Re: [PATCH v2] lisp/progmodes/etags.el improve match by string trimming Date: Sat, 16 Mar 2019 18:38:32 +0300 Message-ID: <1552750712.12475.0@yandex.ru> References: <20190316015314.2335-3-Hi-Angel@yandex.ru> <20190316021333.8552-1-Hi-Angel@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="87374"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 16 16:44:24 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5BU0-000MeW-2D for ged-emacs-devel@m.gmane.org; Sat, 16 Mar 2019 16:44:24 +0100 Original-Received: from localhost ([127.0.0.1]:43193 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5BTy-0007Yy-Ut for ged-emacs-devel@m.gmane.org; Sat, 16 Mar 2019 11:44:22 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5BSj-0007Sj-UR for emacs-devel@gnu.org; Sat, 16 Mar 2019 11:43:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h5BOX-0003g6-3w for emacs-devel@gnu.org; Sat, 16 Mar 2019 11:38:45 -0400 Original-Received: from forward106p.mail.yandex.net ([77.88.28.109]:38382) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h5BOU-0003YB-GH; Sat, 16 Mar 2019 11:38:43 -0400 Original-Received: from mxback8j.mail.yandex.net (mxback8j.mail.yandex.net [IPv6:2a02:6b8:0:1619::111]) by forward106p.mail.yandex.net (Yandex) with ESMTP id 3FE391C80A17; Sat, 16 Mar 2019 18:38:38 +0300 (MSK) Original-Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback8j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 4o8ZaaWhcT-cbEGsEYC; Sat, 16 Mar 2019 18:38:38 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1552750718; bh=1AyBJpXmSbEKJ0+fc9sq+yRX2ntbseeiGEJOkkPK3dM=; h=In-Reply-To:Cc:To:Subject:From:References:Date:Message-Id; b=q/DugoEB6dc3Df62+rG+h27U5QWRLfgwfYCSs4NSU2osPxIcFgFkGdBf1vB2gGEc8 R+3WwN9CUNlUB/xyDvaDS3ZQbtuoRgnPGZdLLqIivYVkXycNtjB6LGPBDQYGG7Yg3N a7kCtqZ5OSjJPNE2TOr4iqjjNpadlM7iF5G2q8wE= Authentication-Results: mxback8j.mail.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id THJgY2oIt6-caKCVvCQ; Sat, 16 Mar 2019 18:38:37 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) In-Reply-To: <83tvg3x9zg.fsf@gnu.org> X-Mailer: geary/master~g91967edc X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 77.88.28.109 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:234222 Archived-At: =D0=92 =D0=A1=D0=B1, =D0=BC=D0=B0=D1=80 16, 2019 at 3:46 =D0=9F=D0=9F (PM),= Eli Zaretskii=20 =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB: >> From: Konstantin Kharlamov >> Date: Sat, 16 Mar 2019 05:13:33 +0300 >>=20 >> Not only this improves general usability, but also works around=20 >> existing >> bug in anjuta-tags=C2=B9 >>=20 >> 1: https://gitlab.gnome.org/GNOME/anjuta/issues/8 >> --- >>=20 >> Sorry, I didn't test the last change on (looking-at pat) removal, it >> still does matching. Fixed here. >=20 > Please explain more about the original problem. The pattern that this functions searches for determines the tag=20 uniquely. But here's a catch: no programming language creates distinc=20 entities (ones that end up in the tag), based only on trailing space.=20 I.e. "foo()" and " foo() " always refer to the same thing. So this change gives 2 improvements: 1. Emacs gonna stop failing finding a tag when someone simply=20 reindented the sources 2. As a side effect, this works around a problem, when a=20 tags-generating program trimmed the whitespace (the commit has a link=20 to anjuta-tags bugreport about that). > The proposed change > looks like it removes the support for selective-display, or am I > missing something? >=20 > IOW, why is the regexp including the CR character a problem? >=20 > Thanks. "CR" is part of the whitespace, so per description above comparison to=20 it is simply unnecessary. =