Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
;; Show a backtrace whenever an error is encountered
(defun user-error-to-backtrace (&rest r)
(with-current-buffer-window
(get-buffer-create "*issue*")
#'display-buffer-pop-up-window nil
(insert (kill-new (with-output-to-string (backtrace))))))
(mapc (lambda (e) (advice-remove e #'user-error-to-backtrace))
'(user-error error))
(mapc (lambda (e) (advice-add e :before #'user-error-to-backtrace))
'(user-error error))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment