Implement doi: links

Patch by Lennart Borgman.
This commit is contained in:
Carsten Dominik 2010-04-26 17:12:45 +02:00
parent 489f41f366
commit a9539f449c
4 changed files with 10 additions and 1 deletions

View File

@ -2,6 +2,7 @@
* org.texi (Conflicts): Document new work-around for windmove.el.
(Plain lists): Describe counter start cookies.
(External links): Add example for a doi link.
2010-04-23 Carsten Dominik <carsten.dominik@gmail.com>

View File

@ -2806,6 +2806,7 @@ the colon. The following list shows examples for each link type.
@example
http://www.astro.uva.nl/~dominik @r{on the web}
doi:10.1000/182 @r{DOI for an electronic resource}
file:/home/dominik/images/jupiter.jpg @r{file, absolute path}
/home/dominik/images/jupiter.jpg @r{same as above}
file:papers/last.pdf @r{file, relative path}

View File

@ -1,5 +1,7 @@
2010-04-26 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-link-types, org-open-at-point): Add doi links.
* org-ascii.el (org-export-ascii-preprocess): Remove list
startcounter cookies.

View File

@ -4496,7 +4496,7 @@ The following commands are available:
(defconst org-non-link-chars "]\t\n\r<>")
(defvar org-link-types '("http" "https" "ftp" "mailto" "file" "news"
"shell" "elisp"))
"shell" "elisp" "doi"))
(defvar org-link-types-re nil
"Matches a link that has a url-like prefix like \"http:\"")
(defvar org-link-re-with-space nil
@ -8680,6 +8680,11 @@ application the system uses for this file type."
(browse-url (concat type ":" (org-link-escape
path org-link-escape-chars-browser))))
((string= type "doi")
(browse-url (concat "http://dx.doi.org/"
(org-link-escape
path org-link-escape-chars-browser))))
((member type '("message"))
(browse-url (concat type ":" path)))