From: Drew Adams <drew.adams@oracle.com>
To: Mauro Aranda <maurooaranda@gmail.com>
Cc: 25152@debbugs.gnu.org
Subject: bug#25152: 25.1; Customize: errors for `restricted-sexp' in `repeat'
Date: Fri, 23 Oct 2020 09:47:15 -0700 (PDT) [thread overview]
Message-ID: <3a76061b-efa8-41b3-9baf-e3297a79b847@default> (raw)
In-Reply-To: <CABczVwergJaDq=hw6cN=3aqsY7aC7EEuoKL85=tGoCzh5uZ3mw@mail.gmail.com>
> Coming back to this, perhaps a good place to warn about a bad default value is where we find it for the first time. So I attach a patch that makes the restricted-sexp widget warn (but not error out) if the internal value is not a string.
> When the user clicks the INS button, the following warning pops up:
> Warning (widget-bad-default-value):
> A widget of type restricted-sexp has a bad default value.
> value: nil
> match function: widget-restricted-sexp-match
> match-alternatives: (functionp)
>
> which I hope conveys good enough information to fix the mistake.
>
> I made it just a warning, because this mistake doesn't always result in
> a messed up buffer. But it can be changed to an error, of course.
I may have forgotten some of what this is about. If so,
please ignore...
If the problem is the default value then it's not up to
a user to fix it, and most users won't know how to deal
with such a warning (or error). They can expect warnings
and errors about their own behavior, but not messages
about some problem with the defcustom definition.
If the problem can't be detected before a user tries to
customize, then maybe, when she does, the warning should
make it very clear that the _default_ value is a mismatch
and advise the user to report a bug to the library author.
IOW make clear that it's not about the user doing
something wrong (and don't prevent the user from
continuing to customize to a valid value). Make it very
clear that the problem is with the maintainer of the code,
and suggest that the user report the problem. And give
the user some detailed info that can be copied in a report
to the library maintainer.
Does this make sense, or am I missing something?
next prev parent reply other threads:[~2020-10-23 16:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-09 18:10 bug#25152: 25.1; Customize: errors for `restricted-sexp' in `repeat' Drew Adams
2016-12-10 4:24 ` npostavs
2016-12-10 4:39 ` Drew Adams
2020-09-05 11:57 ` Mauro Aranda
2020-09-05 14:46 ` Drew Adams
2020-09-05 16:53 ` Mauro Aranda
2020-10-23 12:59 ` Mauro Aranda
2020-10-23 16:47 ` Drew Adams [this message]
2020-10-24 12:33 ` Mauro Aranda
2020-10-24 20:16 ` Drew Adams
2020-10-24 19:41 ` Lars Ingebrigtsen
2020-10-24 20:23 ` Drew Adams
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3a76061b-efa8-41b3-9baf-e3297a79b847@default \
--to=drew.adams@oracle.com \
--cc=25152@debbugs.gnu.org \
--cc=maurooaranda@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).