Last active
December 17, 2015 17:58
-
-
Save ruediger/5649308 to your computer and use it in GitHub Desktop.
urlify doi entries in bibtex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; A better version of this is now upstream! See comments. | |
;; bibtex-mode | |
(add-hook 'bibtex-mode-hook | |
(lambda () | |
(setq bibtex-generate-url-list | |
(cons (list '("doi" . "10\\.[0-9]+/.+") | |
(concat (or org-doi-server-url "http://dx.doi.org/") "%s") | |
'("doi" "10\\.[0-9]+/.+" 0)) | |
bibtex-generate-url-list) | |
bibtex-font-lock-url-regexp | |
(concat "^[ \t]*" | |
(regexp-opt (delete-dups (mapcar 'caar bibtex-generate-url-list)) t) | |
"[ \t]*=[ \t]*")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Upstream: http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/113167