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: Thu, 19 Oct 2017 06:26:57 +0300 Message-ID: <838tg7es1q.fsf@gnu.org> References: <1508125091.3713406.1139815176.12F59A69@webmail.messagingengine.com> <83po9nf58h.fsf@gnu.org> <3fdce54f-f704-66df-75db-843dbd98ec50@yandex.ru> <83h8uwe730.fsf@gnu.org> <59E79312.5050201@gmx.at> <83d15ke3hm.fsf@gnu.org> <87a80ot3ec.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1508383707 9503 195.159.176.226 (19 Oct 2017 03:28:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 19 Oct 2017 03:28:27 +0000 (UTC) Cc: 28855@debbugs.gnu.org, monnier@iro.umontreal.ca, johnw@gnu.org, dgutov@yandex.ru To: Alex Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 19 05:28:22 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 1e51V9-0000Gk-9c for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Oct 2017 05:28:07 +0200 Original-Received: from localhost ([::1]:47313 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e51VG-0007pI-Nd for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Oct 2017 23:28:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55196) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e51V7-0007nr-7V for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2017 23:28:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e51V4-0006sx-2J for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2017 23:28:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40299) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e51V3-0006sh-VA for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2017 23:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e51V3-0007JQ-Ox for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2017 23:28: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: Thu, 19 Oct 2017 03:28: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.150838366228077 (code B ref 28855); Thu, 19 Oct 2017 03:28:01 +0000 Original-Received: (at 28855) by debbugs.gnu.org; 19 Oct 2017 03:27:42 +0000 Original-Received: from localhost ([127.0.0.1]:48980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e51Uh-0007Ig-71 for submit@debbugs.gnu.org; Wed, 18 Oct 2017 23:27:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e51Ug-0007IS-0Q for 28855@debbugs.gnu.org; Wed, 18 Oct 2017 23:27:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e51UZ-0006Ag-Pb for 28855@debbugs.gnu.org; Wed, 18 Oct 2017 23:27:32 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53682) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e51UE-0005gc-Ny; Wed, 18 Oct 2017 23:27:10 -0400 Original-Received: from [176.228.60.248] (port=4414 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e51UE-0006TX-0e; Wed, 18 Oct 2017 23:27:10 -0400 In-reply-to: <87a80ot3ec.fsf@gmail.com> (message from Alex on Wed, 18 Oct 2017 17:58:03 -0600) 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:138706 Archived-At: > From: Alex > Cc: martin rudalics , 28855@debbugs.gnu.org, monnier@iro.umontreal.ca, johnw@gnu.org, dgutov@yandex.ru > Date: Wed, 18 Oct 2017 17:58:03 -0600 > > > Actually, it's the other way around: the current behavior is that > > :align-to always starts counting from the window edge, even if line > > numbers are displayed, so the effect of ":align-to N" is as if N has > > been reduced by the screen space used for displaying the numbers. > > By "window edge" do you mean the edge of the text area? Yes (although it turned out during a previous discussion that "text area" is not understood the same by all the parties ;-) > Since AFAICT there's no current way to specify alignment relative to > the window edges. This is what the 2nd part of Bug#28771 is about. You are talking about header-line, otherwise such origin makes little sense. As I said in that bug, I'd rather provide higher-level features, like centering a string in the header-line regardless of whatever factors can affect the centering. Assuming that your request is motivated by such layout requirements, that is. (But let's not talk here about the issues raised there.) > > The changes I'm about to install make :align-to work as you described > > above, i.e. start measuring the offset from where the line-number > > display ends. > > What about starting the measurement from after the line-prefix attribute > as well? I don't plan doing that, certainly not for Emacs 26. The line-prefix and wrap-prefix are very old features, and no one asked for :align-to to know about them till now, so presumably it isn't very important. (It also sounds like :align-to itself is rarely used and sometimes is entirely unfamiliar-with. I certainly don't see some of its features used in Emacs at all, which makes me wonder why did we implement them in Emacs 21.) > > After the change, if someone wants to always measure the offset from > > the window edge, they could/should use > > > > :align-to (+ left-fringe left-fringe N) > > > > Unless ‘fringes-outside-margins’ is non-nil and there's a left margin. > > For that, there's left-margin that can play the same role. > > If there's a distinct element for line-numbers, then you don't have to > worry about what elements are on the left, or what order they're in. My assumption is that no one will need to worry about that because everybody will want the automatic accounting for the line numbers I'm about to implement. The above is just a fire escape I don't envision to be needed, certainly not frequently.