From: "Rüdiger Sonderfeld" <ruediger@c-plusplus.de>
To: Roland Winkler <winkler@gnu.org>
Cc: emacs-devel@gnu.org
Subject: [PATCH] bibtex.el: Add support for DOI URLs.
Date: Thu, 13 Jun 2013 06:31:25 +0200 [thread overview]
Message-ID: <76176348.Ds77xyHNjy@descartes> (raw)
In-Reply-To: <20921.13183.89795.368672@gargle.gargle.HOWL>
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 <ruediger@c-plusplus.de>
---
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
next prev parent reply other threads:[~2013-06-13 4:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <9b5b428bbf8cbf8590249081f69605cc82d0601b.1370990432.git.ruediger@c-plusplus.de>
2013-06-11 22:41 ` [PATCH 2/2] bibtex.el: Add support for DOI URLs Rüdiger Sonderfeld
2013-06-13 2:50 ` Roland Winkler
2013-06-13 4:31 ` Rüdiger Sonderfeld [this message]
2013-06-25 9:19 ` Roland Winkler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=76176348.Ds77xyHNjy@descartes \
--to=ruediger@c-plusplus.de \
--cc=emacs-devel@gnu.org \
--cc=winkler@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.