feat(rss): add +rss/copy-link command

Add the copy link function and bind it to `gc` as a way to draw similar
comparisons to `go` which takes the entry link and sends it to the
browser
This commit is contained in:
Jeetaditya Chatterjee 2021-09-27 01:21:51 +01:00
parent c92937f890
commit 279a897862
2 changed files with 13 additions and 2 deletions

View file

@ -54,7 +54,14 @@
(forward-line -1)
(call-interactively '+rss/open)))
;;;###autoload
(defun +rss/copy-link ()
"Copy current link to clipboard."
(interactive)
(let ((link (elfeed-entry-link elfeed-show-entry)))
(when link
(kill-new link)
(message "Copied %s to clipboard" link))))
;;
;; Hooks