GNU bug report logs -
#6572
24.0.50; error string from `custom-variable-set'
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Tue, 6 Jul 2010 16:02:01 UTC
Severity: wishlist
Tags: wontfix
Found in version 24.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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))))'"
If :type is:
(restricted-sexp :match-alternatives (integerp 't 'nil))
Then this message is more helpful:
"Specified value does not satisfy `(integerp 't 'nil)'"
In all cases, it is better to give the user some indication of what the
value should be, even if that is via a Lisp sexp.
Yes, the doc string should make clear the permissible values, but this
additional info in the message can also help. It is at least as helpful
as the ubiquitous message "(wrong-type-argument integerp "abc")".
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
of 2010-06-28 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags -Ic:/xpm/include'
This bug report was last modified 3 years and 73 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.