* bug#65622: Inappropriate suppression of backtrace on an error
@ 2023-08-30 13:08 Alan Mackenzie
2023-08-30 23:16 ` Michael Heerdegen
0 siblings, 1 reply; 8+ messages in thread
From: Alan Mackenzie @ 2023-08-30 13:08 UTC (permalink / raw)
To: 65622
Hello, Emacs.
On a recent master branch Emacs:
(i) emacs -Q
(ii) Insert the following into *scratch*:
(defmacro hash-if (condition then-form &rest else-forms)
"A conditional compilation macro analogous to C's #if.
Evaluate CONDITION at macro-expansion time. If it is non-nil,
expand the macro to THEN-FORM. Otherwise expand it to ELSE-FORMS
enclosed in a `progn' form. ELSE-FORMS may be empty."
(declare (indent 2)
(debug (form sexp &rest sexp)))
(if (eval condition lexical-binding)
then-form
(cons 'progn else-forms)))
(defun foo (bar)
(hash-if (< emacs-major-version 19)
(car bar)
(cons bar bar)))
(iii) Evaluate hash-if by putting point after it and doing C-x C-e.
(iv) Attempt to instrument foo for edebug by putting point inside foo and
doing C-u C-M-x. This throws the error: "Ignoring macroexpansion
error: (void-function edebug-after)".
(v) Set debug-on-error to t with M-: (setq debug-on-error t).
(vi) Repeat (iv). This throws the same error, without a backtrace. This
lack of a backtrace is a bug.
(vii) This backtrace is almost certainly being suppressed by a frivolous
condition-case, whose main purpose appears to be making debugging more
difficult. ;-)
(viii) There would appear to be no justification for "ignoring" the error
(void-function edebug-after). Such error should not occur, and needs
debugging.
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#65622: Inappropriate suppression of backtrace on an error
2023-08-30 13:08 bug#65622: Inappropriate suppression of backtrace on an error Alan Mackenzie
@ 2023-08-30 23:16 ` Michael Heerdegen
2023-08-31 7:41 ` Gerd Möllmann
2023-09-20 15:55 ` Alan Mackenzie
0 siblings, 2 replies; 8+ messages in thread
From: Michael Heerdegen @ 2023-08-30 23:16 UTC (permalink / raw)
To: Alan Mackenzie; +Cc: 65622
Alan Mackenzie <acm@muc.de> writes:
> Hello, Emacs.
> (v) Set debug-on-error to t with M-: (setq debug-on-error t).
> (vi) Repeat (iv). This throws the same error, without a backtrace. This
> lack of a backtrace is a bug.
I think you just need (setq eval-expression-debug-on-error t).
Stumbled over the same issue ... yesterday?, or so. Also when debugging
Edebug.
Maybe people would like debug-on-error -> t taking precedence over
eval-expression-debug-on-error -> nil? The danger is they turn both off
by default and then forget about the second one.
Michael.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#65622: Inappropriate suppression of backtrace on an error
2023-08-30 23:16 ` Michael Heerdegen
@ 2023-08-31 7:41 ` Gerd Möllmann
2023-08-31 7:49 ` Eli Zaretskii
2023-09-20 15:55 ` Alan Mackenzie
1 sibling, 1 reply; 8+ messages in thread
From: Gerd Möllmann @ 2023-08-31 7:41 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: Alan Mackenzie, 65622
Michael Heerdegen <michael_heerdegen@web.de> writes:
> Maybe people would like debug-on-error -> t taking precedence over
> eval-expression-debug-on-error -> nil?
FWIW, I would.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#65622: Inappropriate suppression of backtrace on an error
2023-08-31 7:41 ` Gerd Möllmann
@ 2023-08-31 7:49 ` Eli Zaretskii
2023-08-31 8:21 ` Gerd Möllmann
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2023-08-31 7:49 UTC (permalink / raw)
To: Gerd Möllmann; +Cc: michael_heerdegen, acm, 65622
> Cc: Alan Mackenzie <acm@muc.de>, 65622@debbugs.gnu.org
> From: Gerd Möllmann <gerd.moellmann@gmail.com>
> Date: Thu, 31 Aug 2023 09:41:22 +0200
>
> Michael Heerdegen <michael_heerdegen@web.de> writes:
>
> > Maybe people would like debug-on-error -> t taking precedence over
> > eval-expression-debug-on-error -> nil?
>
> FWIW, I would.
That'd probably require a special non-nil, non-t value of
debug-on-error, to avoid surprising others.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#65622: Inappropriate suppression of backtrace on an error
2023-08-31 7:49 ` Eli Zaretskii
@ 2023-08-31 8:21 ` Gerd Möllmann
0 siblings, 0 replies; 8+ messages in thread
From: Gerd Möllmann @ 2023-08-31 8:21 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: michael_heerdegen, acm, 65622
On 31.08.23 09:49, Eli Zaretskii wrote:
>> Cc: Alan Mackenzie <acm@muc.de>, 65622@debbugs.gnu.org
>> From: Gerd Möllmann <gerd.moellmann@gmail.com>
>> Date: Thu, 31 Aug 2023 09:41:22 +0200
>>
>> Michael Heerdegen <michael_heerdegen@web.de> writes:
>>
>>> Maybe people would like debug-on-error -> t taking precedence over
>>> eval-expression-debug-on-error -> nil?
>>
>> FWIW, I would.
>
> That'd probably require a special non-nil, non-t value of
> debug-on-error, to avoid surprising others.
Yes, that's maybe a bit too much effort.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#65622: Inappropriate suppression of backtrace on an error
2023-08-30 23:16 ` Michael Heerdegen
2023-08-31 7:41 ` Gerd Möllmann
@ 2023-09-20 15:55 ` Alan Mackenzie
2023-09-21 1:44 ` Michael Heerdegen
1 sibling, 1 reply; 8+ messages in thread
From: Alan Mackenzie @ 2023-09-20 15:55 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: acm, 65622-done
Hello, Michael.
The bug is now fixed.
On Thu, Aug 31, 2023 at 01:16:42 +0200, Michael Heerdegen wrote:
> Alan Mackenzie <acm@muc.de> writes:
> > Hello, Emacs.
> > (v) Set debug-on-error to t with M-: (setq debug-on-error t).
> > (vi) Repeat (iv). This throws the same error, without a backtrace. This
> > lack of a backtrace is a bug.
> I think you just need (setq eval-expression-debug-on-error t).
> Stumbled over the same issue ... yesterday?, or so. Also when debugging
> Edebug.
> Maybe people would like debug-on-error -> t taking precedence over
> eval-expression-debug-on-error -> nil? The danger is they turn both off
> by default and then forget about the second one.
> Michael.
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#65622: Inappropriate suppression of backtrace on an error
2023-09-20 15:55 ` Alan Mackenzie
@ 2023-09-21 1:44 ` Michael Heerdegen
2023-09-21 13:24 ` Alan Mackenzie
0 siblings, 1 reply; 8+ messages in thread
From: Michael Heerdegen @ 2023-09-21 1:44 UTC (permalink / raw)
To: 65622; +Cc: acm
Alan Mackenzie <acm@muc.de> writes:
> Hello, Michael.
>
> The bug is now fixed.
Great, thanks [...looking at the fix...] so this had nothing to do at
all with `eval-expression-debug-on-error'?
Michael.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#65622: Inappropriate suppression of backtrace on an error
2023-09-21 1:44 ` Michael Heerdegen
@ 2023-09-21 13:24 ` Alan Mackenzie
0 siblings, 0 replies; 8+ messages in thread
From: Alan Mackenzie @ 2023-09-21 13:24 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: 65622
Hello, Michael.
On Thu, Sep 21, 2023 at 03:44:47 +0200, Michael Heerdegen wrote:
> Alan Mackenzie <acm@muc.de> writes:
> > The bug is now fixed.
> Great, thanks [...looking at the fix...] so this had nothing to do at
> all with `eval-expression-debug-on-error'?
Well, not really. But having eval-expression-debug-on-error set now
causes useful backtraces on the particular error. In fact, two
successive backtraces, then a bare error message for a single error.
This is not ideal, but IMHO better than what came before.
And there was a devilish typo there, too, which took me days to find.
:-(
> Michael.
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-09-21 13:24 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-30 13:08 bug#65622: Inappropriate suppression of backtrace on an error Alan Mackenzie
2023-08-30 23:16 ` Michael Heerdegen
2023-08-31 7:41 ` Gerd Möllmann
2023-08-31 7:49 ` Eli Zaretskii
2023-08-31 8:21 ` Gerd Möllmann
2023-09-20 15:55 ` Alan Mackenzie
2023-09-21 1:44 ` Michael Heerdegen
2023-09-21 13:24 ` Alan Mackenzie
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).