瀏覽代碼

org.el: New option `org-doi-server-url'.

* org.el (org-doi-server-url): New option.
(org-open-at-point): Use it.

Thanks to Fabrice Pardo for requesting this.
Bastien Guerry 12 年之前
父節點
當前提交
2bab6b7b6a
共有 1 個文件被更改,包括 10 次插入4 次删除
  1. 10 4
      lisp/org.el

+ 10 - 4
lisp/org.el

@@ -5442,6 +5442,12 @@ by a #."
   :version "24.1"
   :group 'org-appearance)
 
+(defcustom org-doi-server-url "http://dx.doi.org/"
+  "The URL of the DOI server."
+  :type 'string
+  :version "24.2"
+  :group 'org-link)
+
 (defun org-fontify-meta-lines-and-blocks (limit)
   (condition-case nil
       (org-fontify-meta-lines-and-blocks-1 limit)
@@ -9720,10 +9726,10 @@ application the system uses for this file type."
 					 path))))
 
 	 ((string= type "doi")
-	  (browse-url (concat "http://dx.doi.org/" (if (org-string-match-p "[[:nonascii:] ]" path)
-						       (org-link-escape
-							path org-link-escape-chars-browser)
-						     path))))
+	  (browse-url (concat org-doi-server-url (if (org-string-match-p "[[:nonascii:] ]" path)
+						     (org-link-escape
+						      path org-link-escape-chars-browser)
+						   path))))
 
 	 ((member type '("message"))
 	  (browse-url (concat type ":" path)))