all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Jim Porter <jporterbugs@gmail.com>
Cc: 71605@debbugs.gnu.org
Subject: bug#71605: 30.0.50; [PATCH] Support variable-width text in 'visual-wrap-prefix-mode'
Date: Mon, 17 Jun 2024 22:23:01 +0800	[thread overview]
Message-ID: <s54cyof3ayi.fsf@yahoo.com> (raw)
In-Reply-To: <bbe630e2-0354-9d56-9090-dad7c1a4d43e@gmail.com> (Jim Porter's message of "Sun, 16 Jun 2024 19:56:44 -0700")

Jim Porter <jporterbugs@gmail.com> writes:

> (Note: I plan to merge this only after we cut the Emacs 30 release
> branch, since it seems a bit too substantial a change to sneak in
> right near the end. However, I think the patch is mostly done aside
> from one remaining issue, so any feedback is very welcome.)
>
> 'visual-wrap-prefix-mode' has one small issue: since the wrap prefix
> is just a string, the wrapped text may not line up for variable-width
> fonts. This is mainly in cases like so:
>
>   * here is some text that
>     got visually wrapped
>
> If the "* " is variable-width, the second line will probably be
> indented wrong by a few pixels.
>
> The attached patch adds a display spec in this case so that the text
> lines up perfectly. There's currently one problem though: I'm not sure
> how to regenerate the wrap prefix automatically if the face
> changes. It's not hard to handle for 'text-scale-adjust', but I don't

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






  parent reply	other threads:[~2024-06-17 14:23 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17  2:56 bug#71605: 30.0.50; [PATCH] Support variable-width text in 'visual-wrap-prefix-mode' Jim Porter
2024-06-17 11:37 ` Eli Zaretskii
2024-06-17 17:42   ` Jim Porter
2024-06-17 18:20     ` Eli Zaretskii
2024-06-17 18:44       ` Jim Porter
2024-06-18 11:37         ` Eli Zaretskii
2024-06-18 22:17           ` Jim Porter
2024-06-19 11:45             ` Eli Zaretskii
2024-06-19 19:53               ` Jim Porter
2024-06-20  4:58                 ` Eli Zaretskii
2024-06-20  5:37                   ` Jim Porter
2024-06-20  9:58                     ` Eli Zaretskii
2024-06-20 17:36                       ` Jim Porter
2024-06-20 18:08                         ` Eli Zaretskii
2024-06-20 19:01                           ` Jim Porter
2024-06-17 14:23 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-06-17 16:13   ` Jim Porter
2024-06-17 18:17     ` Jim Porter
2024-06-17 19:55       ` Eli Zaretskii
2024-06-17 20:08         ` Jim Porter
2024-06-18  3:02           ` Jim Porter
2024-06-18  6:27             ` Jim Porter
2024-06-18 12:53               ` Eli Zaretskii
2024-06-18 12:39           ` Eli Zaretskii

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=s54cyof3ayi.fsf@yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=71605@debbugs.gnu.org \
    --cc=jporterbugs@gmail.com \
    --cc=luangruo@yahoo.com \
    /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.