[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] doi proxy , a test patch
From: |
Jambunathan K |
Subject: |
Re: [O] doi proxy , a test patch |
Date: |
Wed, 23 May 2012 17:57:51 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.97 (windows-nt) |
Is there a way one can avoid the defcustom and achieve the same effect
using link abbreviations? I don't know.
(info "(org) Link abbreviations")
Fabrice Pardo <address@hidden> writes:
> Hi,
>
> My institution library permits direct access to abstracts
> with pdf contents if we access to article through an address like
> http://dx.doi.org.my.instituti.on/... instead of http://dx.doi.org/...
>
> In the attached patch, I have defined a new variable org-doi-proxy
> which can be customized by the user.
>
> diff --git a/lisp/org.el b/lisp/org.el
> index 05f5375..c5d17a9 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -1838,6 +1838,10 @@ For more examples, see the system specific constants
> (string :tag "Command")
> (sexp :tag "Lisp form")))))
>
> +(defcustom org-doi-proxy "http://dx.doi.org/"
> + "The doi proxy"
> + :group 'org-link-follow
> + :type 'string)
>
>
> (defgroup org-refile nil
> @@ -9714,7 +9718,7 @@ 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)
> + (browse-url (concat org-doi-proxy (if (org-string-match-p
> "[[:nonascii:] ]" path)
> (org-link-escape
> path
> org-link-escape-chars-browser)
> path))))
>
--
- [O] doi proxy , a test patch, Fabrice Pardo, 2012/05/23
- Re: [O] doi proxy , a test patch,
Jambunathan K <=
- Re: [O] doi proxy , a test patch, Christian Moe, 2012/05/23
- Re: [O] doi proxy , a test patch, Fabrice Pardo, 2012/05/23
- Re: [O] doi proxy , a test patch, Christian Moe, 2012/05/23
- Re: [O] doi proxy , a test patch, Jambunathan K, 2012/05/23
- Re: [O] doi proxy , a test patch, Fabrice Pardo, 2012/05/24