unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Error message in debugger not clearly visible sometimes
@ 2023-04-10 19:15 Mariano Montone
  0 siblings, 0 replies; only message in thread
From: Mariano Montone @ 2023-04-10 19:15 UTC (permalink / raw)
  To: Emacs developers

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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-10 19:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-10 19:15 Error message in debugger not clearly visible sometimes Mariano Montone

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