From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#28855: 26.0.90; display-line-numbers-mode does not respect (line|wrap)-prefix '(space :align-to N) text property Date: Tue, 17 Oct 2017 08:49:12 +0300 Message-ID: <4B9BF5B2-3C1C-4036-B0E3-E8BD76846A4D@gnu.org> References: <1508125091.3713406.1139815176.12F59A69@webmail.messagingengine.com> <83po9nf58h.fsf@gnu.org> <1508201231.2707210.1141020784.023AF671@webmail.messagingengine.com> <83a80qfq70.fsf@gnu.org> <1508214738.649851.1141178416.2406474A@webmail.messagingengine.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1508219419 19038 195.159.176.226 (17 Oct 2017 05:50:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 17 Oct 2017 05:50:19 +0000 (UTC) User-Agent: K-9 Mail for Android Cc: 28855@debbugs.gnu.org, dgutov@yandex.ru To: Paul Rankin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 17 07:50:13 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4KlV-0003cj-3i for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Oct 2017 07:50:09 +0200 Original-Received: from localhost ([::1]:36643 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4Klc-0004cg-HZ for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Oct 2017 01:50:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4KlR-0004bl-7m for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2017 01:50:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4KlO-0007gG-6a for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2017 01:50:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35956) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e4KlO-0007fy-37 for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2017 01:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e4KlN-0005Tc-Ko for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2017 01:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Oct 2017 05:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28855 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28855-submit@debbugs.gnu.org id=B28855.150821936921008 (code B ref 28855); Tue, 17 Oct 2017 05:50:01 +0000 Original-Received: (at 28855) by debbugs.gnu.org; 17 Oct 2017 05:49:29 +0000 Original-Received: from localhost ([127.0.0.1]:44637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4Kkr-0005Sm-LZ for submit@debbugs.gnu.org; Tue, 17 Oct 2017 01:49:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4Kkq-0005Sa-RP for 28855@debbugs.gnu.org; Tue, 17 Oct 2017 01:49:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4Kkk-0007Iv-V0 for 28855@debbugs.gnu.org; Tue, 17 Oct 2017 01:49:23 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40804) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4Kkf-0007HH-Vy; Tue, 17 Oct 2017 01:49:18 -0400 Original-Received: from [176.13.228.183] (port=23290 helo=[10.130.128.122]) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e4Kkf-0001jX-Ad; Tue, 17 Oct 2017 01:49:17 -0400 In-Reply-To: <1508214738.649851.1141178416.2406474A@webmail.messagingengine.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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" Xref: news.gmane.org gmane.emacs.bugs:138581 Archived-At: On October 17, 2017 7:32:18 AM GMT+03:00, Paul Rankin wrote: > On Tue, 17 Oct 2017, at 02:04 PM, Eli Zaretskii wrote: > > > :align-to does align to its value, it just doesn't currently > update it > > > to account for the space taken by line numbers=2E >=20 > Justifying a bug doesn=E2=80=99t fix it=2E >=20 > > > It's clear that the change I have in mind will solve your specific > > > problem, I just want to hear from others whether it could harm > > > something=2E > >=20 > > Btw, in case it wasn't clear: a solution for this is already > available -- > > use line-number-display-width when computing the value of :align-to=2E > > Like tabulated-list-mode already does=2E > >=20 > > I'm just trying to establish if a more convenient solution could be > possible=2E >=20 > Further to the cited discussion, if taken to its logical conclusions, > this approach reaches a point of absurdity, e=2Eg=2E >=20 > Three lines with respective :align-to property values of 0, 2 and 4 > should appear like this: >=20 > foo > bar > baz >=20 > However what we get when these lines occur at line 1000 with > display-line-numbers-mode enabled is: >=20 > 1000 foo > 1001 bar > 1002 baz >=20 > Or, given that the line numbers take up a width of 4 characters, and > we don=E2=80=99t account for this width, then logically do we now trunca= te the > leading 4 and 2 characters=2E=2E=2E=2E? >=20 > 1000=20 > 1001 r > 1002 baz Not sure what is alluded to as "this approach"=2E My last point is that instead of 0, 2, and 4, you can use those values plu= s what line-number-display-width returns, and then you will have your expected result=2E