From: John Kitchin Date: Wed, 24 Dec 2014 17:30:46 +0000 (-0500) Subject: added line to remove http://dx.doi.org if it is in the doi field X-Git-Url: https://git.donarmstrong.com/?p=org-ref.git;a=commitdiff_plain;h=979d4932571956628e51f29f9e900dea7ab4187c added line to remove http://dx.doi.org if it is in the doi field --- 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