unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: npostavs@users.sourceforge.net
Cc: Alan Mackenzie <acm@muc.de>, Glenn Morris <rgm@gnu.org>,
	28280@debbugs.gnu.org
Subject: bug#28280: Maximally unhelpful diagnostic message.
Date: Mon, 24 Aug 2020 15:59:33 +0200	[thread overview]
Message-ID: <87h7ssb0vu.fsf@gnus.org> (raw)
In-Reply-To: <874lsp8d2j.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Wed, 30 Aug 2017 08:17:24 -0400")

npostavs@users.sourceforge.net writes:

>> Yes, but that's a separate problem from the essence of the bug report.
>> Regardless of the lack of progress on bug #18913, the information
>> provided by an assert being triggered is unhelpful and inadequate.
>
> Here is a possible M-x cl-show-assert command:

[...]

> * lisp/emacs-lisp/cl-lib.el (cl-show-assert): New command.
> (cl-assert-last-backtrace): New variable.
> * lisp/emacs-lisp/cl-preloaded.el (cl--assertion-failed): Set it.

[...]

> +    (debugger-insert-backtrace cl-assert-last-backtrace t)

This patch still applies, but this function was removed in 2018, so if
we want something like this, we have to refactor out that function
again.

But...  I'm not sure a command like this makes sense.  As others noted
in this thread, if you want a backtrace (from an error or assertion),
then you set debug-on-error.

So if we want this, I think it should be even more general -- a command
to give you a backtrace of the previous error signalled, no matter
whether it was an error or an assertion.

Which I think would be a really nice thing to have -- I run Emacs with
debug-on-error on by default because of this, but if it were possible to
say `M-x debug-last-error', then I wouldn't have to.

Would this be possible to implement in an easy way, I wonder?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2020-08-24 13:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-29 18:41 bug#28280: Maximally unhelpful diagnostic message Alan Mackenzie
2017-08-29 19:20 ` Glenn Morris
2017-08-29 19:32   ` John Wiegley
2017-08-29 20:15   ` Alan Mackenzie
2017-08-30 12:17     ` npostavs
2020-08-24 13:59       ` Lars Ingebrigtsen [this message]
2020-10-11  2:08         ` Lars Ingebrigtsen
2017-08-30 19:51     ` Glenn Morris
2017-08-31 21:11       ` Alan Mackenzie
2017-09-18  5:35 ` Paul Eggert

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=87h7ssb0vu.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=28280@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=npostavs@users.sourceforge.net \
    --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).