mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-29 14:33:34 -05:00
feat(org): bind <localleader> l y to +org/yank-link
For copying the URL component of an org link at point.
This commit is contained in:
@@ -411,6 +411,15 @@ exist, and `org-link' otherwise."
|
||||
(delete-region (match-beginning 0) (match-end 0))
|
||||
(insert label))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +org/yank-link ()
|
||||
"Copy the url at point to the clipboard.
|
||||
If on top of an Org link, will only copy the link component."
|
||||
(interactive)
|
||||
(let ((url (thing-at-point 'url)))
|
||||
(kill-new (or url (user-error "No URL at point")))
|
||||
(message "Copied link: %s" url)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +org/play-gif-at-point ()
|
||||
"TODO"
|
||||
|
Reference in New Issue
Block a user