From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dave Abrahams Newsgroups: gmane.emacs.bugs Subject: bug#12068: 24.1; customizing debug-on-error to nil disables --debug-init Date: Thu, 02 Aug 2012 22:56:06 -0400 Message-ID: References: <4qr4rox4t5.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1343962597 3595 80.91.229.3 (3 Aug 2012 02:56:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 3 Aug 2012 02:56:37 +0000 (UTC) Cc: 12068@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 03 04:56:35 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1Sx842-0000V7-Tk for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Aug 2012 04:56:35 +0200 Original-Received: from localhost ([::1]:53964 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sx842-0002GO-0F for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Aug 2012 22:56:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sx83z-0002G0-2m for bug-gnu-emacs@gnu.org; Thu, 02 Aug 2012 22:56:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sx83x-0003fM-4M for bug-gnu-emacs@gnu.org; Thu, 02 Aug 2012 22:56:30 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48329) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sx83x-0003f6-0l for bug-gnu-emacs@gnu.org; Thu, 02 Aug 2012 22:56:29 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Sx8BF-0000to-T4 for bug-gnu-emacs@gnu.org; Thu, 02 Aug 2012 23:04:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dave Abrahams Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Aug 2012 03:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12068 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 12068-submit@debbugs.gnu.org id=B12068.13439630273435 (code B ref 12068); Fri, 03 Aug 2012 03:04:01 +0000 Original-Received: (at 12068) by debbugs.gnu.org; 3 Aug 2012 03:03:47 +0000 Original-Received: from localhost ([127.0.0.1]:57875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sx8B0-0000tM-Ro for submit@debbugs.gnu.org; Thu, 02 Aug 2012 23:03:47 -0400 Original-Received: from mail-vb0-f44.google.com ([209.85.212.44]:54220) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sx8Ax-0000tC-EY for 12068@debbugs.gnu.org; Thu, 02 Aug 2012 23:03:44 -0400 Original-Received: by vbbez10 with SMTP id ez10so280959vbb.3 for <12068@debbugs.gnu.org>; Thu, 02 Aug 2012 19:56:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=mYN4V+yFr7r9EiD/6HzqfR/ODwU7biOoKJdwSCGcPDA=; b=psuXrbgmC/+QEFQUKgZ5rHBhbmZCQpeMppNVrECuWyY7Ko07eAisQ8/btnYJNrhbfr NzjBkP8MPGYzPEYsqTtmWp17/cOIeswV3GvJFywKV03ggUCdlptx20HIFSnrKSyZr2+e UDbj9aGshed3szXLscON179ghSi0qTywaUdd5/HnFqArl6xhD3LnM2Qt/BGug0gAEkzU dgfE/0hGcZ/k7llCviwczj7hYzFgQ7j7BjHQlx3JEruIv+2eZB9MfLWbAoCpkNhmzahY HuzMLQQfZlPUEgY82w7747odJ2T3VMn0Qz0jvaEmdXJlT9S5h5G88XxGPLgWu9VNefyA wajQ== Original-Received: by 10.58.68.163 with SMTP id x3mr133971vet.41.1343962569458; Thu, 02 Aug 2012 19:56:09 -0700 (PDT) Original-Received: from pluto.local (207-172-223-249.c3-0.smr-ubr3.sbo-smr.ma.static.cable.rcn.com. [207.172.223.249]) by mx.google.com with ESMTPS id l12sm7655469vdh.8.2012.08.02.19.56.07 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 02 Aug 2012 19:56:08 -0700 (PDT) Original-Received: by pluto.local (Postfix, from userid 501) id A77215D9BE80; Thu, 2 Aug 2012 22:56:06 -0400 (EDT) In-Reply-To: (Glenn Morris's message of "Thu, 02 Aug 2012 19:28:47 -0400") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (darwin) X-Gm-Message-State: ALoCoQmU8XGl898ztlrnNjeq70HGrHKduiKH3w7kmSrdDqkuMkH3lol4s5DVMbXM9r1xWpBDjg2J X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:62776 Archived-At: on Thu Aug 02 2012, Glenn Morris wrote: > Maybe you mean, put the error after the customization section. Yes. > The custom block does get put at the end of .emacs when first created. Yes, but once you get into more sophisticated configurations, it's common to want to do things at init time after the customizations are known. > An equivalent scenario would be: > > cat ~/.emacs > > (setq debug-on-error nil) > (error "foo") > > There's no good solution to that other than "don't do that then".=20 Of course there's a good solution to that... > Except maybe have a really-debug-on-error variable that overrides > debug-on-error and is only settable by --debug-init.=20 There you go. Another possibility is for whatever deals with errors to check whether we're in initialization, and if so, consult argv for the presence of "--debug-init" and let that override debug-on-error. Being able to reliably debug initialization is really crucial, because if your init gets messed up, you really can't do anything else. > But it seems like pointless complexity to me. I assume debug-on-error > is customizable for people who want to set it non-nil. I can't imagine > many will customize it to nil. What do you think people will do when they've set it to non-nil and then they get annoyed that they're always dropping into the debugger and really want to turn it back off so it sticks? That's right, they'll do what I did: customize it to nil. I'm not even all that na=C3=AFve a user; I've done some pretty heavy elisp hacking in my time, and this still really baffled me for a long time.=20=20 --=20 Dave Abrahams BoostPro Computing Software Development Training http://www.boostpro.com Clang/LLVM/EDG Compilers C++ Boost