all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Paul Rankin <hello@paulwrankin.com>
Cc: 28855@debbugs.gnu.org, dgutov@yandex.ru
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	[thread overview]
Message-ID: <4B9BF5B2-3C1C-4036-B0E3-E8BD76846A4D@gnu.org> (raw)
In-Reply-To: <1508214738.649851.1141178416.2406474A@webmail.messagingengine.com>

On October 17, 2017 7:32:18 AM GMT+03:00, Paul Rankin <hello@paulwrankin.com> 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.
> 
> Justifying a bug doesn’t fix it.
> 
> > > 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.
> > 
> > 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.
> > Like tabulated-list-mode already does.
> > 
> > I'm just trying to establish if a more convenient solution could be
> possible.
> 
> Further to the cited discussion, if taken to its logical conclusions,
> this approach reaches a point of absurdity, e.g.
> 
> Three lines with respective :align-to property values of 0, 2 and 4
> should appear like this:
> 
>     foo
>       bar
>         baz
> 
> However what we get when these lines occur at line 1000 with
> display-line-numbers-mode enabled is:
> 
>     1000 foo
>     1001 bar
>     1002 baz
> 
> Or, given that the line numbers take up a width of 4 characters, and
> we don’t account for this width, then logically do we now truncate the
> leading 4 and 2 characters....?
> 
>     1000 
>     1001 r
>     1002 baz

Not sure what is alluded to as "this approach".

My last point is that instead of 0, 2, and 4, you can use those values plus what
line-number-display-width returns, and then you will have your expected
result.





  reply	other threads:[~2017-10-17  5:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-16  3:38 bug#28855: 26.0.90; display-line-numbers-mode does not respect (line|wrap)-prefix '(space :align-to N) text property Paul Rankin
2017-10-16 16:05 ` Eli Zaretskii
2017-10-17  0:47   ` Paul Rankin
2017-10-17  2:44     ` Eli Zaretskii
2017-10-17  4:04       ` Eli Zaretskii
2017-10-17  4:32         ` Paul Rankin
2017-10-17  5:49           ` Eli Zaretskii [this message]
2017-10-17  7:17             ` Paul Rankin
2017-10-18  9:29   ` Dmitry Gutov
2017-10-18 16:47     ` Eli Zaretskii
2017-10-18 17:44       ` martin rudalics
2017-10-18 17:55         ` Eli Zaretskii
2017-10-20  9:40           ` Eli Zaretskii
2017-10-18 18:05         ` Eli Zaretskii
2017-10-18 18:34           ` martin rudalics
2017-10-18 18:44             ` Eli Zaretskii
2017-10-18 23:58           ` Alex
2017-10-19  3:26             ` Eli Zaretskii
2017-10-19  5:54               ` Alex
2017-10-20  7:03                 ` Eli Zaretskii
2017-10-18 22:52       ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B9BF5B2-3C1C-4036-B0E3-E8BD76846A4D@gnu.org \
    --to=eliz@gnu.org \
    --cc=28855@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=hello@paulwrankin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.