Skip to content

Instantly share code, notes, and snippets.

@vermiculus
Created September 26, 2016 02:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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