all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Adriel Dumas--Jondeau <leirda@disroot.org>
Cc: 61677@debbugs.gnu.org
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	[thread overview]
Message-ID: <83bkllsuqd.fsf@gnu.org> (raw)
In-Reply-To: <87v8ju4ody.fsf@disroot.org> (message from Adriel Dumas--Jondeau on Tue, 21 Feb 2023 19:35:21 +0100)

> 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	other threads:[~2023-02-22 13:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 11:40 bug#61677: 30.0.50; Display-Fill-Column-Indicator mode shifts with narrow characters near end of line Adriel Dumas--Jondeau via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-21 15:00 ` Eli Zaretskii
2023-02-21 18:35   ` Adriel Dumas--Jondeau via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-22 13:19     ` Eli Zaretskii [this message]
2023-02-22 22:54       ` Adriel Dumas--Jondeau via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=83bkllsuqd.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=61677@debbugs.gnu.org \
    --cc=leirda@disroot.org \
    /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.