From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Short patch for review Date: Thu, 19 Feb 2015 08:44:20 -0500 Message-ID: References: <83r3tm4fia.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1424353508 17226 80.91.229.3 (19 Feb 2015 13:45:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Feb 2015 13:45:08 +0000 (UTC) Cc: kelly@prtime.org, bruce.connor.am@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 19 14:44:52 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YORPH-0004Ja-5L for ged-emacs-devel@m.gmane.org; Thu, 19 Feb 2015 14:44:43 +0100 Original-Received: from localhost ([::1]:56380 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YORPG-0005Oc-B7 for ged-emacs-devel@m.gmane.org; Thu, 19 Feb 2015 08:44:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YORP3-0005OF-9t for emacs-devel@gnu.org; Thu, 19 Feb 2015 08:44:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOROz-0008L2-8q for emacs-devel@gnu.org; Thu, 19 Feb 2015 08:44:29 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:49366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOROz-0008K6-43; Thu, 19 Feb 2015 08:44:25 -0500 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t1JDiKAu000856; Thu, 19 Feb 2015 08:44:21 -0500 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 32FB4AE11B; Thu, 19 Feb 2015 08:44:20 -0500 (EST) In-Reply-To: <83r3tm4fia.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 19 Feb 2015 07:49:49 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5222=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5222> : inlines <2238> : streams <1392861> : uri <1859328> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:183298 Archived-At: > 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 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