From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH 2/3] lisp/progmodes/etags.el don't (forward-char) as it's overriden next line Date: Mon, 18 Mar 2019 05:34:00 +0200 Message-ID: <838sxcx3dj.fsf@gnu.org> References: <20190316015314.2335-1-Hi-Angel@yandex.ru> <20190316015314.2335-2-Hi-Angel@yandex.ru> <1552855468.16839.3@yandex.ru> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="199872"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Konstantin Kharlamov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 18 04:35:03 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 1h5j3G-000pr3-ST for ged-emacs-devel@m.gmane.org; Mon, 18 Mar 2019 04:35:02 +0100 Original-Received: from localhost ([127.0.0.1]:35186 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5j3F-0000r4-Od for ged-emacs-devel@m.gmane.org; Sun, 17 Mar 2019 23:35:01 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5j2U-0000pZ-Db for emacs-devel@gnu.org; Sun, 17 Mar 2019 23:34:16 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58821) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5j2U-0007tP-11; Sun, 17 Mar 2019 23:34:14 -0400 Original-Received: from [176.228.60.248] (port=2310 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h5j2R-00089D-Fh; Sun, 17 Mar 2019 23:34:13 -0400 In-reply-to: <1552855468.16839.3@yandex.ru> (message from Konstantin Kharlamov on Sun, 17 Mar 2019 23:44:28 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:234314 Archived-At: > Date: Sun, 17 Mar 2019 23:44:28 +0300 > From: Konstantin Kharlamov > Cc: emacs-devel@gnu.org > > > But that's incorrect: a tag in a tags table always begins at the > > beginning of a line, so it must be a search anchored at the beginning > > of the line. And in selective-display mode ^M counts as the beginning > > of a line. > > Great, now that we established that part, to reply your question why we > don't care about the beginnging of the line let me quote my other mail: > > > The pattern that this functions searches for determines the tag > uniquely. But here's a catch: no programming language creates distinc > entities (ones that end up in the tag), based only on trailing space. > I.e. "foo()" and " foo() " always refer to the same thing. I'm not talking about whitespace. I'm talking about a tags table file that names a symbol 'foobar', say. If you search for a tag "bar" and do not anchor the search at the beginning of a line, you will decide that "bar" is present on the "foobar" line, although it really isn't. Right? If we want to solve a problem with variable leading whitespace, we need a more sophisticated solution that just dropping the anchor. Or did I miss something?