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
Message #14 received at 49274 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 2021-06-29 18:38, Mauro Aranda wrote:
> I think this is a good change.
Thanks!
>> *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.]
When it's 'editable-field as in my patch, you are correct that RET
leaves
the field, but C-j or M-j will insert a newline, and M-q actually seems
to
work too (though it doesn't preserve the first line of the doc string
like
it would in a doc string in elisp mode).
If there's a fix for duplicating the string with a text widget, I'll be
happy with it! Thanks.
--
CL
[2021-06-29_19-43.png (image/png, attachment)]
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.