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 2/3] lisp/progmodes/etags.el don't (forward-char) as it's overriden next line Date: Sun, 17 Mar 2019 23:44:28 +0300 Message-ID: <1552855468.16839.3@yandex.ru> References: <20190316015314.2335-1-Hi-Angel@yandex.ru> <20190316015314.2335-2-Hi-Angel@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="249690"; 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 Sun Mar 17 21:54:31 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 1h5cnd-0012p1-MN for ged-emacs-devel@m.gmane.org; Sun, 17 Mar 2019 21:54:29 +0100 Original-Received: from localhost ([127.0.0.1]:60068 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5cnc-00045i-No for ged-emacs-devel@m.gmane.org; Sun, 17 Mar 2019 16:54:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5cmQ-0003zF-Fz for emacs-devel@gnu.org; Sun, 17 Mar 2019 16:53:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h5ce2-0007pe-TV for emacs-devel@gnu.org; Sun, 17 Mar 2019 16:44:36 -0400 Original-Received: from forward101p.mail.yandex.net ([2a02:6b8:0:1472:2741:0:8b7:101]:33086) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h5ce0-0007on-Ql; Sun, 17 Mar 2019 16:44:33 -0400 Original-Received: from mxback15j.mail.yandex.net (mxback15j.mail.yandex.net [IPv6:2a02:6b8:0:1619::91]) by forward101p.mail.yandex.net (Yandex) with ESMTP id 3801A328110D; Sun, 17 Mar 2019 23:44:30 +0300 (MSK) Original-Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback15j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id wguL6nIQcq-iUxm8JUf; Sun, 17 Mar 2019 23:44:30 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1552855470; bh=ARlq0DovTuqFkTftc4oyu0MZ6MW7k23JsCuC8wxEHKw=; h=In-Reply-To:Cc:To:Subject:From:References:Date:Message-Id; b=m2ZuVf1UL67tCRuO5KqXvYok/CBJyBIjBnkmH0cPI/iXjeD9r7HT1XbwzPjRjVlau lYoGmlIX0XxCan7WVfyoSylvf0L9F+A2X/w76uuOJD2KV8tRL5XURyXgPOSW94O1QZ rDU9VXA2fb+j22UV5abIAp6rMekaugWsO2X5Y1cU= Authentication-Results: mxback15j.mail.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id wdKw4uGlSC-iTjCXZYU; Sun, 17 Mar 2019 23:44:29 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) In-Reply-To: <83a7htw7z1.fsf@gnu.org> X-Mailer: geary/master~g91967edc X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a02:6b8:0:1472:2741:0:8b7:101 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:234300 Archived-At: =F7 =F7=D3, =CD=C1=D2 17, 2019 at 11:40 =F0=F0 (PM), Eli Zaretskii=20 =CE=C1=D0=C9=D3=C1=CC: >> Date: Sun, 17 Mar 2019 23:27:30 +0300 >> From: Konstantin Kharlamov >> Cc: emacs-devel@gnu.org >>=20 >> >> Okay, so: ^M appears in selective-display-mode only in the end=20 >> of a >> >> line. >> > >> > No, ^M _replaces_ newline characters, so what was previously=20 >> several >> > lines is now a single long line. >>=20 >> Sure, but after the patch we don't match the whole line anymore. We >> only match the tag. We don't care if it's at the beginning of the=20 >> line >> or in the middle of it. We only look for the tag. So we don't care=20 >> if >> line has a newline character or ^M. >=20 > 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=20 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=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). =