bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Lars Ingebrigtsen
Subject: bug#6572: 24.0.50; error string from `custom-variable-set'
Date: Mon, 09 May 2022 16:55:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

"Drew Adams" <drew.adams@oracle.com> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]