summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/init-bib.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/init-bib.el b/lisp/init-bib.el
index a2f5bc8..f32a4d7 100644
--- a/lisp/init-bib.el
+++ b/lisp/init-bib.el
@@ -77,6 +77,12 @@ point. The link is opened using the settings of
(interactive (list (km/doi-at-point)))
(browse-url (org-link-escape-browser (concat org-doi-server-url doi))))
+(defun km/copy-doi-as-kill ()
+ "Copy DOI at point to kill ring."
+ (interactive)
+ (-when-let (doi (km/doi-at-point))
+ (kill-new (message "%s" (concat "doi:" doi)))))
+
(defun km/doi-at-point ()
"Return DOI at point."
(save-excursion