unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Mariano Montone <marianomontone@gmail.com>
To: Emacs developers <emacs-devel@gnu.org>
Subject: Error message in debugger not clearly visible sometimes
Date: Mon, 10 Apr 2023 16:15:06 -0300	[thread overview]
Message-ID: <cb06de34-65a1-3f57-9ba6-b54b5fbf0b2d@gmail.com> (raw)

Hello,

     sometimes error messages are not clearly displayed in the debugger.

The error message appears truncated for long strings, and if it has 
multiple lines, then they are not properly formatted.

So I have this in my setup:

(defun debugger-insert-error-message (args)
   "Insert debugger errors in a different way."
   (when (eql (car args) 'error)
     (let ((error (second args)))
       (insert (error-message-string error))
       (newline 2))))

(advice-add 'debugger--insert-header :before 
#'debugger-insert-error-message)


Just inserts the error message in the debugger buffer before displaying 
anything else.

I think it would be nice that Emacs did this by default. What do you think?


       Mariano




                 reply	other threads:[~2023-04-10 19:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=cb06de34-65a1-3f57-9ba6-b54b5fbf0b2d@gmail.com \
    --to=marianomontone@gmail.com \
    --cc=emacs-devel@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).