Make doom/copy-backtrace copy the whole backtrace

This commit is contained in:
Henrik Lissner 2018-08-10 19:13:31 +02:00
parent 519330fcb1
commit d6f89aaafd
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -124,16 +124,13 @@ branch and commit."
;;;###autoload
(defun doom/copy-backtrace ()
"Copy the first 1000 bytes from the *Backtrace* window into your clipboard for
easy pasting into a bug report or discord."
"Copy the contents of the *Backtrace* window into your clipboard for easy
pasting into a bug report or discord."
(interactive)
(if-let* ((buf (get-buffer "*Backtrace*")))
(with-current-buffer buf
(kill-new
(string-trim
(buffer-substring-no-properties
(point-min)
(min (point-max) 1000)))))
(string-trim (buffer-string))))
(user-error "No backtrace buffer detected")))