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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6572 in the body.
You can then email your comments to 6572 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6572
; Package
emacs
.
(Tue, 06 Jul 2010 16:02:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Drew Adams" <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 06 Jul 2010 16:02:02 GMT)
Full text and
rfc822 format available.
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'
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#6572
; Package
emacs
.
(Mon, 09 May 2022 14:56:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 6572 <at> debbugs.gnu.org (full text, mbox):
"Drew Adams" <drew.adams <at> 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
Added tag(s) wontfix.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 09 May 2022 14:56:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
6572 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 09 May 2022 14:56:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#6572
; Package
emacs
.
(Mon, 09 May 2022 15:24:01 GMT)
Full text and
rfc822 format available.
Message #15 received at 6572 <at> debbugs.gnu.org (full text, mbox):
> > 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
> > (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))))'"
And it's not difficult to provide that help.
> Well, I can see the charm of doing something like this,
> but the Customize interface is for users,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Yes, it is. And that's who we should help, by
fixing this as suggested: users. In this case,
users who try to provide a value that's required,
as specified by that restricted-sexp.
> 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.
It's not about "charm". It's about helping users.
Users of Customize include everyone, including
users who can understand Lisp. If a user doesn't
understand that improved message, s?he's more
likely to get help from others by providing that
helpful message.
A doc string is important. That doesn't mean we
can't also have better error messages.
Yet another too-bad "I just love closing bugs".
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#6572
; Package
emacs
.
(Mon, 09 May 2022 15:59:02 GMT)
Full text and
rfc822 format available.
Message #18 received at 6572 <at> debbugs.gnu.org (full text, mbox):
> From: Drew Adams <drew.adams <at> oracle.com>
> Date: Mon, 9 May 2022 15:23:07 +0000
>
> Yet another too-bad "I just love closing bugs".
And yet another case of Drew's being unable to accept that the
maintainers' judgment can legitimately be different from his.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 07 Jun 2022 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 316 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.