GNU bug report logs -
#37706
`inhibit-message' affects error backtrace printing in batch mode
Previous Next
Reported by: Paul Pogonyshev <pogonyshev <at> gmail.com>
Date: Fri, 11 Oct 2019 17:19:01 UTC
Severity: normal
Tags: fixed
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37706 in the body.
You can then email your comments to 37706 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#37706
; Package
emacs
.
(Fri, 11 Oct 2019 17:19:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Paul Pogonyshev <pogonyshev <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 11 Oct 2019 17:19:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
When in batch mode, `debug-on-error' can be used to make Emacs
print backtraces of any errors that occur:
$ emacs --batch --eval "(let ((debug-on-error t)) (error \"...\"))"
Error: (error (error "..."))
(signal error ("..."))
(error "...")
(let ((debug-on-error t)) (error "..."))
(eval (let ((debug-on-error t)) (error "...")) t)
(command-line-1 ("--eval" "(let ((debug-on-error t)) (error \"...\"))"))
(command-line)
(normal-top-level)
...
However, variable `inhibit-message' affects it:
$ emacs --batch --eval "(let ((debug-on-error t) (inhibit-message
t)) (error \"...\"))"
...
This is wrong. When binding `inhibit-message' you have no idea
that an error might happen inside the block. Actually, you
rather hope it doesn't. In other words, when binding
`inhibit-message' you never target error backtraces -- those are
only unwanted side-effects of bugs in your code.
Attached patch makes function `debug' temporarily rebind
`inhibit-message' to nil. The patch is just three lines, but `diff'
got mad because of reindentation.
Paul
[0001-Explicitly-bind-inhibit-message-to-nil-in-debug.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#37706
; Package
emacs
.
(Thu, 20 Aug 2020 15:11:03 GMT)
Full text and
rfc822 format available.
Message #8 received at 37706 <at> debbugs.gnu.org (full text, mbox):
Paul Pogonyshev <pogonyshev <at> gmail.com> writes:
> When in batch mode, `debug-on-error' can be used to make Emacs
> print backtraces of any errors that occur:
[...]
> This is wrong. When binding `inhibit-message' you have no idea
> that an error might happen inside the block. Actually, you
> rather hope it doesn't. In other words, when binding
> `inhibit-message' you never target error backtraces -- those are
> only unwanted side-effects of bugs in your code.
>
> Attached patch makes function `debug' temporarily rebind
> `inhibit-message' to nil. The patch is just three lines, but `diff'
> got mad because of reindentation.
Thanks for the patch -- it looks like this was fixed by this commit:
commit 502059433ce0e9699eb73d21656ce6e9e127d63b
Author: Paul Pogonyshev <pogonyshev <at> gmail.com>
AuthorDate: Sun Jan 26 22:54:32 2020 -0500
* lisp/emacs-lisp/debug.el (debug): Merge the non-interactive cases
bug#38927
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 20 Aug 2020 15:11:07 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 28.1, send any further explanations to
37706 <at> debbugs.gnu.org and Paul Pogonyshev <pogonyshev <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 20 Aug 2020 15:11:07 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 18 Sep 2020 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 220 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.