unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alex <agrambot@gmail.com>
Cc: 28855@debbugs.gnu.org, monnier@iro.umontreal.ca, johnw@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: Thu, 19 Oct 2017 06:26:57 +0300	[thread overview]
Message-ID: <838tg7es1q.fsf@gnu.org> (raw)
In-Reply-To: <87a80ot3ec.fsf@gmail.com> (message from Alex on Wed, 18 Oct 2017 17:58:03 -0600)

> From: Alex <agrambot@gmail.com>
> Cc: martin rudalics <rudalics@gmx.at>,  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.





  reply	other threads:[~2017-10-19  3:26 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
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 [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=838tg7es1q.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=28855@debbugs.gnu.org \
    --cc=agrambot@gmail.com \
    --cc=dgutov@yandex.ru \
    --cc=johnw@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).