From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Eli Zaretskii <eliz@gnu.org>
Cc: kelly@prtime.org, bruce.connor.am@gmail.com, emacs-devel@gnu.org
Subject: Re: Short patch for review
Date: Thu, 19 Feb 2015 08:44:20 -0500 [thread overview]
Message-ID: <jwv61ayhvos.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83r3tm4fia.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 19 Feb 2015 07:49:49 +0200")
> Do we have guidelines for which errors should be 'user-error'?
The idea is that if an error is normally not the result of an Elisp bug
but a "pilot error", we should use `user-error' so that users who set
debug-on-error to t don't get dropped into the debugger when they hit
this signal.
Now, in practice, I think most/all places where we signal an error can
sometimes be due to a pilot error and sometimes due to a bug in Elisp.
So it's a judgment call.
I wish we could have a more reliable way to handle that.
To the best of my knowledge we *could* do better by indicating for those
"user-error" a condition under which this should be treated as a "pilot
error", and this condition usually looks like "we're called from
function <foo> and that function was called interactively".
E.g. if forward-sexp bumps into EOB it's a user-error when forward-sexp
was called interactively, but it's a normal error otherwise.
But of course, if forward-sexp was called from a wrapper which itself
was called interactively it might still be a user-error.
IOW doing it right automatically is pretty much impossible.
So we're currently stuck with this judgment call.
Stefan
prev parent reply other threads:[~2015-02-19 13:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-18 21:17 Short patch for review Artur Malabarba
2015-02-18 22:51 ` Stefan Monnier
2015-02-19 5:49 ` Eli Zaretskii
2015-02-19 10:30 ` Kelly Dean
2015-02-19 11:07 ` Artur Malabarba
2015-02-19 11:18 ` Eli Zaretskii
2015-02-19 13:44 ` Stefan Monnier [this message]
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=jwv61ayhvos.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=bruce.connor.am@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=kelly@prtime.org \
/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).