Revived copy-link-or-file!

This commit is contained in:
Emmet 2023-06-15 18:27:06 -05:00
parent bdffc3809d
commit 23a2dcc1a1
4 changed files with 14 additions and 4 deletions

View file

@ -353,6 +353,7 @@ same directory as the org-buffer and insert a link to this file."
(defun org-copy-link-to-clipboard-at-point ()
"Copy current link at point into clipboard (useful for images and links)"
;; Remember to press C-g to kill this foreground process if it hangs!
(interactive)
(if (eq major-mode #'org-mode)
(link-hint-copy-link-at-point)
@ -363,7 +364,7 @@ same directory as the org-buffer and insert a link to this file."
(if (eq major-mode #'image-mode)
(image-mode-copy-file-name-as-kill)
)
(shell-command (concat "~/.doom.d/scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh " (gui-get-selection 'CLIPBOARD)) nil nil)
(shell-command (concat "~/.emacs.d/scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh " (gui-get-selection 'CLIPBOARD)) nil nil)
)
(map! :leader