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: Mon, 16 Oct 2017 19:05:18 +0300 Message-ID: <83po9nf58h.fsf@gnu.org> References: <1508125091.3713406.1139815176.12F59A69@webmail.messagingengine.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1508170038 27229 195.159.176.226 (16 Oct 2017 16:07:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 16 Oct 2017 16:07:18 +0000 (UTC) Cc: 28855@debbugs.gnu.org To: Paul Rankin , Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 16 18:07: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 1e47v0-0005bB-Bq for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Oct 2017 18:07:06 +0200 Original-Received: from localhost ([::1]:33922 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e47v7-0000Nu-Du for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Oct 2017 12:07:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e47u2-0008HH-Kh for bug-gnu-emacs@gnu.org; Mon, 16 Oct 2017 12:06:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e47ty-0003Ys-LM for bug-gnu-emacs@gnu.org; Mon, 16 Oct 2017 12:06:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35382) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e47ty-0003YY-IR for bug-gnu-emacs@gnu.org; Mon, 16 Oct 2017 12:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e47ty-0002vw-87 for bug-gnu-emacs@gnu.org; Mon, 16 Oct 2017 12:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Oct 2017 16:06:02 +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.150816994911254 (code B ref 28855); Mon, 16 Oct 2017 16:06:02 +0000 Original-Received: (at 28855) by debbugs.gnu.org; 16 Oct 2017 16:05:49 +0000 Original-Received: from localhost ([127.0.0.1]:44063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e47tl-0002vS-8t for submit@debbugs.gnu.org; Mon, 16 Oct 2017 12:05:49 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36181) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e47tj-0002vF-2X for 28855@debbugs.gnu.org; Mon, 16 Oct 2017 12:05:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e47tY-0003Na-4k for 28855@debbugs.gnu.org; Mon, 16 Oct 2017 12:05:41 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e47tY-0003NQ-0y; Mon, 16 Oct 2017 12:05:36 -0400 Original-Received: from [176.228.60.248] (port=2002 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e47tX-0008FD-G2; Mon, 16 Oct 2017 12:05:35 -0400 In-reply-to: <1508125091.3713406.1139815176.12F59A69@webmail.messagingengine.com> (message from Paul Rankin on Mon, 16 Oct 2017 13:38:11 +1000) 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:138533 Archived-At: > From: Paul Rankin > Date: Mon, 16 Oct 2017 13:38:11 +1000 > > display-line-numbers-mode does not respect line-prefix or wrap-prefix text properties when set as '(space :align-to N). > > To reproduce: > > 1. emacs -Q > 3. type some text in *scratch* buffer > 2. M-: (put-text-property (line-beginning-position) (line-end-position) 'line-prefix '(space :align-to 2)) > 3. M-x display-line-numbers-mode > > Expected results: > > Line numbers should be displayed before line-prefix (and/or wrap-prefix) space of 2 columns. > > Actual results: > > Line numbers eat the line-prefix and wrap-prefix space, effectively aligning the text back to 0. Right, :align-to still counts from the window edge, even when line numbers are displayed, whereas you expected it to count from the end of the line-number display. When this was briefly discussed during development, we decided not to change the reported window dimensions and geometry, including those of the text area, to account for the screen estate taken by the line-number display. But maybe :align-to should be an exception, when used to align buffer text (as opposed to header-line or mode-line)? Though I'm bothered whether some users of :align-to may not want this automatic offset. :align-to is a very popular feature; does anyone know or imagine why a Lisp program would NOT like such an offset? What do people think? Dmitry, what about company-mode popups, for example? It should be a very easy change to offset the origin for every use of :align-to for buffer text: it's basically a single line of code in a single place. But if some applications won't want that, we will probably need an entirely new attribute, which is much less nice, IMO.