Add doom/copy-backtrace command
This commit is contained in:
parent
6e52e2d07c
commit
7ed9c5196f
1 changed files with 13 additions and 0 deletions
|
@ -120,6 +120,19 @@ branch and commit."
|
||||||
(or (vc-git-working-revision doom-core-dir)
|
(or (vc-git-working-revision doom-core-dir)
|
||||||
"n/a")))
|
"n/a")))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun doom/copy-backtrace ()
|
||||||
|
"Copy the contents of the *Backtrace* window to clipboard."
|
||||||
|
(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)))))
|
||||||
|
(user-error "No backtrace buffer detected")))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Vanilla sandbox
|
;; Vanilla sandbox
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue