GNU bug report logs -
#52143
29.0.50; Customize type `group' displays a hanging colon
Previous Next
Reported by: Brahimi Saifullah <brahimi.saifullah <at> gmail.com>
Date: Sat, 27 Nov 2021 13:11:01 UTC
Severity: normal
Found in version 29.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52143 in the body.
You can then email your comments to 52143 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#52143
; Package
emacs
.
(Sat, 27 Nov 2021 13:11:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Brahimi Saifullah <brahimi.saifullah <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 27 Nov 2021 13:11:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Using a `group' widget type inside a `defcustom' form will result in a rather
ugly hanging colon when displayed in the Customize buffer:
(defcustom foo '(1 2 3) ""
:type '(group integer integer integer))
M-x customize-option foo
[group-1.jpg (image/jpeg, inline)]
[Message part 3 (text/plain, inline)]
After some digging, I found related bugs #31309 and #33566, the latter which
introduced the current `:format' as a workaround to an error.
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31309
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33566
From what I gather: a colon is necessary, for whatever reason. So having a
tag-less type, as `group' claims to be, is not possible through normal means.
What *is* possible, however, is hiding the colon with a display text property
(The following should go in `group's `define-widget' form, at wid-edit.el):
:format (concat (propertize ":" 'display "") "%v")
[group-2.jpg (image/jpeg, inline)]
[Message part 5 (text/plain, inline)]
Or with a newline:
:format (concat (propertize ":" 'display "") "\n%v")
[group-3.jpg (image/jpeg, inline)]
[Message part 7 (text/plain, inline)]
Since the actual text remains unchanged, this should be harmless. WDYT?
--------------------------------------------------------------------------------
This, of course, is merely polishing the workaround, the problem at its core
remains unchanged. Though I am not yet privy to the inner working of Customize
and its widgets, all of this seems to stem from some questionable decisions at
`custom-variable-value-create'.
As someone mentioned in one of the linked bug reports that the widget code is
convoluted, I wonder, how well is this code understood? Or perhaps discussing
its behavior is pointless, if nobody can truly understand what the consequences
of righting these questionable decisions would be.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#52143
; Package
emacs
.
(Sun, 28 Nov 2021 16:17:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 52143 <at> debbugs.gnu.org (full text, mbox):
>>From what I gather: a colon is necessary, for whatever reason. So having a
> tag-less type, as `group' claims to be, is not possible through normal means.
I don't know why 'group' should be "tag-less" (whatever that incurs)
and thus would simply use
(define-widget 'group 'default
"A widget which groups other widgets inside."
:convert-widget 'widget-types-convert-widget
:copy 'widget-types-copy
:tag "Group"
:format "%{%t%}:\n%v"
...
But maybe there is a reason for the current specification.
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#52143
; Package
emacs
.
(Mon, 29 Nov 2021 15:54:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 52143 <at> debbugs.gnu.org (full text, mbox):
Brahimi Saifullah <brahimi.saifullah <at> gmail.com> writes:
> Or with a newline:
>
> :format (concat (propertize ":" 'display "") "\n%v")
I think that looks pretty good, so I've pushed it to Emacs 29.
martin rudalics <rudalics <at> gmx.at> writes:
>>>From what I gather: a colon is necessary, for whatever reason. So having a
>> tag-less type, as `group' claims to be, is not possible through normal means.
>
> I don't know why 'group' should be "tag-less" (whatever that incurs)
> and thus would simply use
>
> (define-widget 'group 'default
> "A widget which groups other widgets inside."
> :convert-widget 'widget-types-convert-widget
> :copy 'widget-types-copy
> :tag "Group"
> :format "%{%t%}:\n%v"
> ...
>
> But maybe there is a reason for the current specification.
I'm guessing the reason is that they wanted to have the display less
cluttered?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug marked as fixed in version 29.1, send any further explanations to
52143 <at> debbugs.gnu.org and Brahimi Saifullah <brahimi.saifullah <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 29 Nov 2021 15:54:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 28 Dec 2021 12:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 81 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.