diff options
author | Kyle Meyer <kyle@kyleam.com> | 2015-02-07 23:52:14 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2015-02-07 23:52:14 -0500 |
commit | dda65fa86776226f9a2e934b3265f97f64951e8d (patch) | |
tree | e818fc1bbf8b00ec48633308453b870c94a4cbdf | |
parent | ca63baa1f667115b736d3d14d1b0761ab8cd24d5 (diff) | |
download | emacs.d-dda65fa86776226f9a2e934b3265f97f64951e8d.tar.gz |
Add command copy-doi-as-kill
-rw-r--r-- | lisp/init-bib.el | 6 |
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 |