Subject: bug#6572: 24.0.50; error string from `custom-variable-set'

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 09 May 2022 16:55:22 +0200

"Drew Adams" <[email-masked]> writes:

> If the defcustom :type is (restricted-sexp...), and you try to customize
> to a value that does not respect this :type, you get a generic error
> message: "The specified value is not valid".
>
> This message could & should be more specific, referencing the sexp that
> defines the restriction the value should respect.  E.g. if :type is:
>
> (restricted-sexp :match-alternatives 'natnump)
>
> Then the message would be more helpful if it said something like this:
>
> "Specified value does not satisfy `natnump'"
>
> If :type is:
>
> (restricted-sexp :match-alternatives
>                  (lambda (x) (and (foop x) (not (barp x)))))
>
> Then this message is more helpful:
>
> "Specified value does not satisfy
>  `(lambda (x) (and (foop x) (not (barp x))))'"

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

Well, I can see the charm of doing something like this, but the
Customize interface is for users, and telling them

 "Specified value does not satisfy
  `(lambda (x) (and (foop x) (not (barp x))))'"

is way too nerdy even for Emacs.  Users should look at the doc string
that will explain this to them in words.

So I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no