GNU bug report logs -
#71605
30.0.50; [PATCH] Support variable-width text in 'visual-wrap-prefix-mode'
Previous Next
Reported by: Jim Porter <jporterbugs <at> gmail.com>
Date: Mon, 17 Jun 2024 02:57:02 UTC
Severity: normal
Tags: patch
Found in version 30.0.50
Done: Jim Porter <jporterbugs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 71605 <at> debbugs.gnu.org (full text, mbox):
On 6/17/2024 7:23 AM, Po Lu via Bug reports for GNU Emacs, the Swiss
army knife of text editors wrote:
> Actually, there's more than just this one problem. To start with, the
> existing format of the generated line prefix properties enables the
> extracted fill prefix to be displayed consistently on any frame,
> whatever the metrics of its default font/face. This I consider a far
> more critical capability than perfect alignment of wrapped text in the
> presence of a variable-pitch default font, as the latter is virtually
> unknown among programmers, and also unimplementable within reasonable
> standards of performance with pixelwise spacers.
That's a good point. In practice, we should only do this if the
first-line prefix uses a variable-pitch font, since otherwise we might
as well just use the requisite number of space characters as before,
sans display-spec.
> If this is to be
> installed, please condition it behind a user option and restore the
> existing logic that you have effaced as the default.
I'll add a check for variable-pitch fonts and a user option. With the
variable-pitch check, I think it should be ok for the user option to
default to enabling this new behavior? For fixed-pitch fonts, the new
code would behave the same as before regardless of the option.
Note that I haven't removed any of the old logic though; it's all there
as before, since the space characters are useful for terminals (where
the pixelwise :width display-spec doesn't do anything for us, if I
understand correctly). I did extract parts of 'fill-content-prefix' into
'visual-wrap--content-prefix', but the only parts I removed were the
ones for handling multiple lines; those don't apply here, since
'visual-wrap-prefix-function' gets the prefixes one line at a time.
This bug report was last modified 347 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.