GNU bug report logs -
#44942
28.0.50; Emacs should print a backtrace on uncaught errors in batch mode
Previous Next
Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>
Date: Sun, 29 Nov 2020 10:48:02 UTC
Severity: normal
Found in version 28.0.50
Done: Philipp Stephani <p.stephani2 <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #19 received at 44942 <at> debbugs.gnu.org (full text, mbox):
Am So., 6. Dez. 2020 um 18:00 Uhr schrieb Eli Zaretskii <eliz <at> gnu.org>:
>
> > From: Philipp Stephani <p.stephani2 <at> gmail.com>
> > Date: Sun, 6 Dec 2020 17:50:17 +0100
> >
> > Am So., 29. Nov. 2020 um 16:27 Uhr schrieb Philipp Stephani
> > <p.stephani2 <at> gmail.com>:
> > >
> > > Am So., 29. Nov. 2020 um 11:48 Uhr schrieb Philipp Stephani
> > > <p.stephani2 <at> gmail.com>:
> > > >
> > > >
> > > > $ emacs -Q -batch -eval '(progn (defun foo () (error "Boo")) (foo))'
> > > > Boo
> > > >
> > > > Emacs should print a backtrace here to make it possible to debug such
> > > > errors. It's possible to force Emacs to print a backtrace by binding
> > > > `debug-on-error', however, that is incorrect because it changes the
> > > > meaning of `with-demoted-errors' and `condition-case-unless-debug',
> > > > causing code that would normally work to fail with an error. Instead,
> > > > `signal' should print a backtrace if in batch mode and if it jumps to
> > > > the top-level error handler. It looks like this logic could be
> > > > special-cased in signal_or_quit, similar to the debugger logic.
> > > >
> > >
> > > I've attached a patch.
> >
> > Pushed to master as commit 40e11743ca.
>
> This is an incompatible change.
Is it? In other words, do we guarantee that no stack trace is being
printed if debug-on-error is nil? I'd say that parsing error messages
is brittle anyway, and we're not obliged to provide stable output.
> Is there a way to get back previous
> behavior? If so, please mention that in NEWS; if not, let's please
> provide a way to get back the old behavior.
I'd be OK adding a variable for this, but on the other hand I'm not
really convinced that this is really a breaking change (see above).
This bug report was last modified 4 years and 249 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.