This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 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