* bug#37916: GNUS: wrong item selected in gnus-thread-hide-subtree customization
@ 2019-10-25 7:13 Sergey Organov
2019-10-25 10:39 ` Lars Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Sergey Organov @ 2019-10-25 7:13 UTC (permalink / raw
To: 37916
The "Non-nil" defcustom item is selected in customization buffer when
actual value of the gnus-thread-hide-subtree is 'nil.
-- 8< --
Fix gnus-thread-hide-subtree defcustom
* lisp/gnus/gnus-sum.el (gnus-thread-hide-subtree): fix order of
items to prevent first 'sexp' from matching 'nil, that caused
"Non-nil" item to be selected in customization buffer when actual
variable value is 'nil.
---
lisp/gnus/gnus-sum.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index b5d7448..1970465 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -332,11 +332,11 @@ This can be a predicate specifier which says which threads to hide.
If threads are hidden, you have to run the command
`gnus-summary-show-thread' by hand or select an article."
:group 'gnus-thread
- :type '(radio (sexp :format "Non-nil\n"
+ :type '(radio (const nil)
+ (sexp :format "Non-nil\n"
:match (lambda (widget value)
(not (or (consp value) (functionp value))))
:value t)
- (const nil)
(sexp :tag "Predicate specifier")))
(defcustom gnus-thread-hide-killed t
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#37916: GNUS: wrong item selected in gnus-thread-hide-subtree customization
2019-10-25 7:13 bug#37916: GNUS: wrong item selected in gnus-thread-hide-subtree customization Sergey Organov
@ 2019-10-25 10:39 ` Lars Ingebrigtsen
2019-10-25 13:12 ` Sergey Organov
0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-25 10:39 UTC (permalink / raw
To: Sergey Organov; +Cc: 37916
Sergey Organov <sorganov@gmail.com> writes:
> The "Non-nil" defcustom item is selected in customization buffer when
> actual value of the gnus-thread-hide-subtree is 'nil.
Hm... 'nil and nil are the same.
[...]
> - :type '(radio (sexp :format "Non-nil\n"
> + :type '(radio (const nil)
> + (sexp :format "Non-nil\n"
> :match (lambda (widget value)
> (not (or (consp value) (functionp value))))
> :value t)
> - (const nil)
Oh, I see. I think the problem is that that :match is just wrong.
Changing the order of the values (as this patch does) also makes the
problem go away, but I think the right fix here is to fix the :match.
So I've installed the following patch instead:
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index b5d744843f..f21bc7584e 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -334,7 +334,7 @@ gnus-thread-hide-subtree
:group 'gnus-thread
:type '(radio (sexp :format "Non-nil\n"
:match (lambda (widget value)
- (not (or (consp value) (functionp value))))
+ (and value (not (functionp value))))
:value t)
(const nil)
(sexp :tag "Predicate specifier")))
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#37916: GNUS: wrong item selected in gnus-thread-hide-subtree customization
2019-10-25 10:39 ` Lars Ingebrigtsen
@ 2019-10-25 13:12 ` Sergey Organov
0 siblings, 0 replies; 3+ messages in thread
From: Sergey Organov @ 2019-10-25 13:12 UTC (permalink / raw
To: Lars Ingebrigtsen; +Cc: 37916
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Sergey Organov <sorganov@gmail.com> writes:
>
>> The "Non-nil" defcustom item is selected in customization buffer when
>> actual value of the gnus-thread-hide-subtree is 'nil.
>
> Hm... 'nil and nil are the same.
>
> [...]
>
>> - :type '(radio (sexp :format "Non-nil\n"
>> + :type '(radio (const nil)
>> + (sexp :format "Non-nil\n"
>> :match (lambda (widget value)
>> (not (or (consp value) (functionp value))))
>> :value t)
>> - (const nil)
>
> Oh, I see. I think the problem is that that :match is just wrong.
> Changing the order of the values (as this patch does) also makes the
> problem go away, but I think the right fix here is to fix the :match.
Yes, I also thought it is, but took kludgy way as I'm not familiar
with the :math specifications.
Thanks for fixing it the right way!
-- Sergey
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-25 13:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-25 7:13 bug#37916: GNUS: wrong item selected in gnus-thread-hide-subtree customization Sergey Organov
2019-10-25 10:39 ` Lars Ingebrigtsen
2019-10-25 13:12 ` Sergey Organov
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.