bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28855: 26.0.90; display-line-numbers-mode does not respect (line|wra


From: Alex
Subject: bug#28855: 26.0.90; display-line-numbers-mode does not respect (line|wrap)-prefix '(space :align-to N) text property
Date: Wed, 18 Oct 2017 23:54:54 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> Yes (although it turned out during a previous discussion that "text
> area" is not understood the same by all the parties ;-)

Yeah, my bad (though now I'm using the definition from (elisp) Window
Sizes :-).

>> 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.)

It doesn't seem that line/wrap-prefix are very commonly used (though
perhaps I'm just not using the relevant packages), so coupled with
:align-to's rarity it doesn't seem surprising that no one has asked for
it until now.

Anyway, my argument is still that I believe a default starting point
past the *-prefix area is more intuitive than before it. I figured that
since you brought up changing the default starting point, that I might
as well run it by you again.

Just accounting for line-numbers is better than the current behaviour,
but if you do decide to do that, then it would be nice to have something
along the lines of:

  :align-to (+ prefix prefix N)

That would mean "offset from the *-prefix area", which would let you
align to non-prefix text in the buffer.

>> 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.

I think it's unlikely that one would want to account for line-numbers
and not line/wrap-prefix, but I figure that it would be nice to provide
a flexible fire escape.

Still, if alignment treats line-numbers specially, then I think it makes
sense to provide it as a full-fledged element for pixel specifications.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]