all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Sergey Organov <sorganov@gmail.com>
Cc: 37916@debbugs.gnu.org
Subject: bug#37916: GNUS: wrong item selected in gnus-thread-hide-subtree customization
Date: Fri, 25 Oct 2019 12:39:56 +0200	[thread overview]
Message-ID: <87a79pds77.fsf@gnus.org> (raw)
In-Reply-To: <87mudp9u1k.fsf@osv.gnss.ru> (Sergey Organov's message of "Fri, 25 Oct 2019 10:13:43 +0300")

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





  reply	other threads:[~2019-10-25 10:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2019-10-25 13:12   ` Sergey Organov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a79pds77.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=37916@debbugs.gnu.org \
    --cc=sorganov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.