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: luangruo@yahoo.com, 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 13:08:47 -0700	[thread overview]
Message-ID: <c71f647c-d8e8-59b8-1fc4-4d270eb85d69@gmail.com> (raw)
In-Reply-To: <86le33qr8d.fsf@gnu.org>

On 6/17/2024 12:55 PM, Eli Zaretskii wrote:
>> Cc: 71605@debbugs.gnu.org
>> Date: Mon, 17 Jun 2024 11:17:45 -0700
>> From: Jim Porter <jporterbugs@gmail.com>
>>
>> Replacing :align-to with :width works just fine though. It's entirely
>> possible I'm just doing something wrong, but maybe this is a bug?
> 
> It's a bug in Emacs 29 and Emacs 30.  It works in Emacs 27.

Ah, that explains it.

>> (Now what would be great is if :align-to supported a *string* value that
>> meant "use the pixel-width of this string".
> 
> It's already possible: just have a variable that holds the width, and
> use it in the :align-to expression.

That would make the code simpler, but I'd still need to figure out when 
to reevaluate the variable to update things.

>> Which actually gives me an
>> idea... what if the wrap-prefix is just the original text like "* " and
>> we fontify it to be invisible? It's not part of the buffer and you can't
>> select it anyway, so it doesn't really matter what the text is so long
>> as it's not visible.)
> 
> I don't think I follow: how is this relevant to the issue at hand?

I was thinking you could wrap "* this is some text" like so:

   * this is
   * some text

The second "* " would come from the wrap-prefix, but we'd make the 
foreground transparent (or the same color as the background) so it 
wouldn't be visible. Then it would always take up the same width as the 
first "* " because it's the same string with the same font and everything.





  reply	other threads:[~2024-06-17 20:08 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
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 [this message]
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=c71f647c-d8e8-59b8-1fc4-4d270eb85d69@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=71605@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.