GNU bug report logs - #71605
30.0.50; [PATCH] Support variable-width text in 'visual-wrap-prefix-mode'

Previous Next

Package: emacs;

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 #20 received at 71605 <at> debbugs.gnu.org (full text, mbox):

From: Jim Porter <jporterbugs <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 71605 <at> debbugs.gnu.org
Subject: Re: bug#71605: 30.0.50; [PATCH] Support variable-width text in
 'visual-wrap-prefix-mode'
Date: Mon, 17 Jun 2024 11:17:45 -0700
On 6/17/2024 9:13 AM, Jim Porter wrote:
> 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).

Evidently I wasn't understanding this correctly, since further testing 
and consulting the code shows that the :width display-spec works just 
fine on terminals. It does make it harder to get this patch working well 
though...

Maybe :align-to could be made to work. It doesn't seem to work at all 
for me, even in a minimal test case like calling this on a long line of 
text:

  (put-text-property (point-min) (point-max) 'wrap-prefix '(space 
:align-to 4))

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?

(Now what would be great is if :align-to supported a *string* value that 
meant "use the pixel-width of this string". 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.)






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.