emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] bibtex.el: Add support for DOI URLs.


From: Rüdiger Sonderfeld
Subject: [PATCH] bibtex.el: Add support for DOI URLs.
Date: Thu, 13 Jun 2013 06:31:25 +0200
User-agent: KMail/4.10.3 (Linux/3.8.0-23-generic; KDE/4.10.3; x86_64; ; )

On Thursday 13 June 2013 12:50:39 Roland Winkler wrote:
> Thanks.  I believe this patch is a bit complicated. It depends on
> whether org-mode is loaded before or after bibtex-mode.  But this
> can go straight into bibtex-generate-url-list (which the user can
> customize if she doesn't like it; but I can only think of more
> exotic reasons why this might be necessary).

I simplified the patch according to your suggestion.

-- 8< 
-------------------------------------------------------------------------- >8 --

Digital object identifier (DOI) are commonly used to provide
persistent citations.  Therefore it seems to be a good idea to provide
default support for them in bibtex.el.

* lisp/textmodes/bibtex.el (bibtex-generate-url-list): Add support for
  DOI URLs.

Signed-off-by: Rüdiger Sonderfeld <address@hidden>
---
 lisp/textmodes/bibtex.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index 6280e19..171f373 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -1224,7 +1224,10 @@ (defcustom bibtex-summary-function 'bibtex-summary
                  (function :tag "Personalized function")))
 
 (defcustom bibtex-generate-url-list
-  '((("url" . ".*:.*")))
+  '((("url" . ".*:.*"))
+    (("doi" . "10\\.[0-9]+/.+")
+     "http://dx.doi.org/%s";
+     ("doi" ".*" 0)))
   "List of schemes for generating the URL of a BibTeX entry.
 These schemes are used by `bibtex-url'.
 
@@ -1261,6 +1264,7 @@ (defcustom bibtex-generate-url-list
      (\"volume\" \".*\" 0)
      (\"pages\" \"\\`[A-Z]?[0-9]+\" 0)))"
   :group 'bibtex
+  :version "24.4"
   :type '(repeat
           (cons :tag "Scheme"
                 (cons :tag "Matcher" :extra-offset 4
-- 
1.8.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]