GNU bug report logs -
#49274
[PATCH] lisp/cus-theme: retain documentation string when customizing theme
Previous Next
Reported by: Christopher League <league <at> contrapunctus.net>
Date: Tue, 29 Jun 2021 15:34:01 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 28.1
Done: Mauro Aranda <maurooaranda <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Christopher League <league <at> contrapunctus.net> writes:
> On 2021-06-29 18:38, Mauro Aranda wrote:
>>> *Implementation details:* we had to move the chunk marked "Load the
>>> theme settings" earlier in the function `customize-create-theme`. Then
>>> the `custom-theme-description` widget was made an `editable-field`
>>> whose value comes from `theme-documentation` if available, else
>>> `format-time-string`. The rest of the patch is reindentation due to
>>> the larger scope of the let that holds the theme settings.
>>
>> Why change the widget from a text widget to an editable-field
>> widget? I think a text widget is better here, since a docstring usually
>> would have more than one line, and the editable-field keymap remaps RET
>> while the text keymap doesn't.
>
> Interesting. I'm not that familiar with the widget types, but the reason
> I
> chose 'editable-field is because 'text seems to *duplicate* the content,
> which is much more annoying for a multi-line doc string than a short
> name.
> I'll attach a screen-shot -- this is the effect when it's
> (widget-create 'text ...). [Or maybe this is a widget bug? I'm using git
> master from earlier today.]
That's because there was a change to the :format property of the text
widget, but this call wasn't updated. Try overriding it like this:
(widget-create 'text :format "%v" ...)
> If there's a fix for duplicating the string with a text widget, I'll be
> happy with it! Thanks.
The above should make it work. Please try it, thank you.
This bug report was last modified 3 years and 321 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.