unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: 65622@debbugs.gnu.org
Subject: bug#65622: Inappropriate suppression of backtrace on an error
Date: Wed, 30 Aug 2023 13:08:26 +0000	[thread overview]
Message-ID: <ZO8_SpFzaWeF_7xe@ACM> (raw)

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).





             reply	other threads:[~2023-08-30 13:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-30 13:08 Alan Mackenzie [this message]
2023-08-30 23:16 ` bug#65622: Inappropriate suppression of backtrace on an error 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

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=ZO8_SpFzaWeF_7xe@ACM \
    --to=acm@muc.de \
    --cc=65622@debbugs.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).