all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 71605-done@debbugs.gnu.org, luangruo@yahoo.com
Subject: bug#71605: 30.0.50; [PATCH] Support variable-width text in 'visual-wrap-prefix-mode'
Date: Sun, 4 Aug 2024 12:24:38 -0700	[thread overview]
Message-ID: <0809f4ea-c113-2f5c-929d-9c241aafa040@gmail.com> (raw)
In-Reply-To: <86zfpvv0zf.fsf@gnu.org>

On 8/2/2024 12:27 AM, Eli Zaretskii wrote:
> LGTM, thanks.  Feel free to install on master.

Thanks, merged to master as f70a6ea0ea8.

Hopefully this patch maintains all the existing correct behaviors and 
fixes most of the issues with variable-pitch text. To summarize, this is 
how things *should* behave (anything else is probably a mistake; just 
let me know and I'll try to fix it):

1. With fixed-pitch fonts, everything should look the same as before.

2. With variable-pitch fonts in a terminal frame, everything should look
    the same as before, but...

    a. If you then open that buffer in a GUI frame, there's a small
       chance that the first line of a bulleted list will be too wide.
       This can happen if the prefix contains wider-than-average
       characters in the specified font.

3. With variable-pitch fonts in a GUI frame, wrapped lines in bulleted
    lists and the like should now lined up correctly in GUI , but...

   a. The first line might have a bit of extra space after the bullet.
      (The space occupied by "* " or what-have-you is rounded up to an
      integer number of canonical-width spaces.)

   b. If you then open that same buffer in a terminal frame, there's a
      small chance that the text after the bullet will have an extra
      space (same with the wrapped text). This can happen if the prefix
      contains wider-than-average characters in the specified font.

   c. If you change the font of the wrapped text to something with
      different metrics, there's a small chance that the first line of a
      bulleted list will be too wide.

2a and 3b would probably be fixable by using overlays restricted to a 
particular window. 3c would probably be fixable by calling 
'jit-lock-refontify' at the appropriate time.

While that's quite a few caveats with the current implementation, I 
think overall they should only come up in rare cases, and should never 
affect fixed-pitch text (which is the only thing 
'visual-wrap-prefix-mode' could work correctly with before).





  reply	other threads:[~2024-08-04 19:24 UTC|newest]

Thread overview: 27+ 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-07-28  4:53                             ` Jim Porter
2024-08-02  7:27                               ` Eli Zaretskii
2024-08-04 19:24                                 ` Jim Porter [this message]
2024-06-17 14:23 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=0809f4ea-c113-2f5c-929d-9c241aafa040@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=71605-done@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --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.