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: use of `user-error' Date: Sun, 05 May 2013 00:45:45 -0400 Message-ID: References: <5DBEBF3431DC44C8A258E389611FF827@us.oracle.com> <8738u99q5p.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1367729158 22729 80.91.229.3 (5 May 2013 04:45:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 5 May 2013 04:45:58 +0000 (UTC) Cc: emacs-devel@gnu.org To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 05 06:45:52 2013 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 1UYqpc-0006kT-Du for ged-emacs-devel@m.gmane.org; Sun, 05 May 2013 06:45:52 +0200 Original-Received: from localhost ([::1]:33713 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYqpc-0000fy-33 for ged-emacs-devel@m.gmane.org; Sun, 05 May 2013 00:45:52 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYqpX-0000ft-GG for emacs-devel@gnu.org; Sun, 05 May 2013 00:45:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYqpW-0003Fm-MF for emacs-devel@gnu.org; Sun, 05 May 2013 00:45:47 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:42189) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYqpW-0003Fi-HD for emacs-devel@gnu.org; Sun, 05 May 2013 00:45:46 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCqRF/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IPAS-Result: Av4EABK/CFFMCqRF/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="11062611" Original-Received: from 76-10-164-69.dsl.teksavvy.com (HELO pastel.home) ([76.10.164.69]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 05 May 2013 00:45:41 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 81FAD67A1B; Sun, 5 May 2013 00:45:45 -0400 (EDT) In-Reply-To: <8738u99q5p.fsf@web.de> (Michael Heerdegen's message of "Mon, 29 Apr 2013 19:56:34 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 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:159312 Archived-At: > I would love to have `debug-on-error' bound to t all the time, to get an > immediate backtrace of errors that happen very rarely and are hard to > reproduce. But getting a popped up debugger every time I hit a wrong > key or did something obviously wrong by accident is a pain in the ass. I do have debug-on-error set to t in my .emacs. If you regularly get backtraces in this situation, then we should probably replace some of those errors with user-errors. > So, can we try to substitute the appropriate occurrences of `error' by > `user-error', or are there any things that prevent us from doing that? Nothing, except for the fact that we should do it on a case-by-case basis. `user-error' was mostly introduced to trim down debug-ignored-errors and to make it easier for the programmer to signal a non-backtrace-popping error (which used to require adding an entry to debug-ignored-errors). And yes, there are many `error's which would benefit from being turned into `user-errors'. But search&replace is not a good way to do it. Stefan