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

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

bug#61677: 30.0.50; Display-Fill-Column-Indicator mode shifts with narro


From: Eli Zaretskii
Subject: bug#61677: 30.0.50; Display-Fill-Column-Indicator mode shifts with narrow characters near end of line
Date: Wed, 22 Feb 2023 15:19:38 +0200

> From: Adriel Dumas--Jondeau <leirda@disroot.org>
> Cc: 61677@debbugs.gnu.org
> Date: Tue, 21 Feb 2023 19:35:21 +0100
> 
> Whether this expectation is shared or not, and based on my current
> knowledge, I think there's at least these three choices:
> 
> - Leaving things as is (The most straightforward and efficient way, and
>   I would be absolutely okay with that)
> 
> - Is there any documentation somewhere about that? Adding a warning
>   based on the current font pitch with a pointer towards a more detailed
>   explanation on Display-Fill-Column-Indicator triggers (and maybe
>   hooking it at frame-font changes). This would at least give some hints
>   to users and would reduce the occurence of threads as the current one
>   (Probably low effort unless there is doc to write about it).
> 
> - Modifying Display-Fill-Column-Indicator in order to display two
>   vertical guides: the “global” vertical line that we currently have but
>   with the catch that it should hold true for the current font pitch,
>   pixel based, a single line at ~fill-column~ for normal characters,
>   independent from the character count. A “character count” indicator,
>   relative to each line, that may or may not be the same as the global
>   one, with different glyph and color, doesn't show up if the same as
>   the global one. It means the character count glyph may only be shown
>   with a variable-pitch font on a line that contains narrowed or wide
>   characters (This is the most controversial suggestion I'd say).
> 
> The benefit of the latter suggestion is that it still works the same
> with fixed-pitch font (the character count should actually be the same
> as the pixel size in this case), but it would be more expressive with
> variable-pitch, thus fixing the inconsistencies that currently occur.
> 
> The caveat is it brokes the implicit rule that the indicator is about
> the character count with variable-pitch font (as it would truly be about
> taken physical space on the screen). But the fact that a new character
> is displayed when it's not should (could?) make things clear.
> 
> I can make code suggestions for this last one (not right now though) if
> nobody else is willing to, and if there's no real objection to it.
> 
> What do you think?

I decided to go with the second alternative, and documented these
caveats in the doc string of display-fill-column-indicator-mode and in
the Emacs manual (on the emacs-29 branch).  I think extending this
feature as you suggest in the last alternative would be too much.
However, if someone wants to work on this feature, I'm okay with
considering such an extension.

So I'm leaving this bug open for now.

Thanks.





reply via email to

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