From 979d4932571956628e51f29f9e900dea7ab4187c Mon Sep 17 00:00:00 2001 From: John Kitchin Date: Wed, 24 Dec 2014 12:30:46 -0500 Subject: [PATCH] added line to remove http://dx.doi.org if it is in the doi field --- org-ref.org | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/org-ref.org b/org-ref.org index 23c0250..fd9e3d6 100644 --- a/org-ref.org +++ b/org-ref.org @@ -1428,7 +1428,9 @@ The function must take no arguments and work on the key at point. Do not modify (with-temp-buffer (insert-file-contents bibfile) (bibtex-search-entry key) - (bibtex-autokey-get-field "doi"))))) + (bibtex-autokey-get-field "doi") + ;; in case doi is a url, remove the url part. + (replace-regexp-in-string "^http://dx.doi.org/" "" doi))))) ;; functions that operate on key at point for click menu -- 2.39.2