From: Dave Abrahams <dave@boostpro.com>
To: Glenn Morris <rgm@gnu.org>
Cc: 12068@debbugs.gnu.org
Subject: bug#12068: 24.1; customizing debug-on-error to nil disables --debug-init
Date: Thu, 02 Aug 2012 22:56:06 -0400 [thread overview]
Message-ID: <m2ipd08z09.fsf@pluto.luannocracy.com> (raw)
In-Reply-To: <djy5lwq3f4.fsf@fencepost.gnu.org> (Glenn Morris's message of "Thu, 02 Aug 2012 19:28:47 -0400")
on Thu Aug 02 2012, Glenn Morris <rgm-AT-gnu.org> 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".
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.
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ïve a user;
I've done some pretty heavy elisp hacking in my time, and this still
really baffled me for a long time.
--
Dave Abrahams
BoostPro Computing Software Development Training
http://www.boostpro.com Clang/LLVM/EDG Compilers C++ Boost
next prev parent reply other threads:[~2012-08-03 2:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-27 14:10 bug#12068: 24.1; customizing debug-on-error to nil disables --debug-init Dave Abrahams
2012-08-02 23:16 ` Glenn Morris
2012-08-02 23:28 ` Glenn Morris
2012-08-03 2:56 ` Dave Abrahams [this message]
2012-08-03 20:08 ` Glenn Morris
2012-08-03 20:23 ` Dave Abrahams
2014-02-01 8:05 ` Lars Ingebrigtsen
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=m2ipd08z09.fsf@pluto.luannocracy.com \
--to=dave@boostpro.com \
--cc=12068@debbugs.gnu.org \
--cc=rgm@gnu.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).