(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