]> git.donarmstrong.com Git - org-ref.git/commitdiff
added line to remove http://dx.doi.org if it is in the doi field
authorJohn Kitchin <jkitchin@andrew.cmu.edu>
Wed, 24 Dec 2014 17:30:46 +0000 (12:30 -0500)
committerJohn Kitchin <jkitchin@andrew.cmu.edu>
Wed, 24 Dec 2014 17:30:46 +0000 (12:30 -0500)
org-ref.org

index 23c02501aa3217da07496a0972d7f8aa4fba6274..fd9e3d65fd425b68d15e4cb3b08171f9d3bc00a7 100644 (file)
@@ -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