Skip to content

Commit

Permalink
[emacs] add function to copy break statement for debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
meain committed Mar 30, 2024
1 parent d495e79 commit 9ecfdab
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions emacs/.config/emacs/init.el
Original file line number Diff line number Diff line change
Expand Up @@ -4391,6 +4391,15 @@ Pass in `LISTITEMS to decide if you wanna create a new item or search for existi
(delete-file (buffer-file-name))
(meain/kill-current-buffer-unless-scratch))

(use-package emacs
:commands (meain/copy-debugger-break-statement)
:config
(defun meain/copy-debugger-break-statement ()
(interactive)
(let ((file-name (buffer-file-name))
(line-number (line-number-at-pos)))
(meain/copy-to-clipboard (format "b %s:%s" file-name line-number)))))

;; Copy filename to clipboard
(defun meain/copy-file-name-to-clipboard (&optional abs-path)
"Copy the current filename into clipboard. Pass `ABS-PATH' if you need absolute path."
Expand Down

0 comments on commit 9ecfdab

Please sign in to comment.