bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51550: 29.0.50; Customize Group INS buttons sometimes don't have a l


From: Po Lu
Subject: bug#51550: 29.0.50; Customize Group INS buttons sometimes don't have a left box line
Date: Thu, 30 Dec 2021 09:11:58 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> So make an overlay whose property is 'invisible' -- doesn't that work?

I will try, thanks.

> What do you mean by "wid-insert might not be able to insert" -- isn't
> the text of the button inserted as well? then why not make the
> invisible character part of the inserted button text?

It shouldn't insert anything except for the text of the button itself --
for one, the invisible character won't end up in the kill ring when you
try to save the button text.

There are also various assumptions made all over the place about the
position of a button and the length of the text in the buffer, and I'm
not confident I can fix them all.

>>   (with-current-buffer (get-buffer-create "*test*")
>>     (insert #("foo\nfoo" 0 4 (face widget-field)))
>>     (let ((overlay (make-overlay 5 8 nil t nil)))
>>       (overlay-put overlay 'before-string (propertize " " 'invisible t))
>>       (overlay-put overlay 'face custom-button)))
>> 
>> After this, I would have expected the second "foo" in *test* to begin
>> with a box line, but it doesn't.

> Will look into this soon.

Thanks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]