emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: Fabrice Pardo <fabrice.pardo@lpn.cnrs.fr>
Cc: emacs-orgmode@gnu.org
Subject: Re: doi proxy , a test patch
Date: Wed, 23 May 2012 17:57:51 +0530	[thread overview]
Message-ID: <8162bnaxq0.fsf@gmail.com> (raw)
In-Reply-To: <4FBCD000.7030104@lpn.cnrs.fr> (Fabrice Pardo's message of "Wed, 23 May 2012 13:54:40 +0200")


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 <fabrice.pardo@lpn.cnrs.fr> 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))))
>

-- 

  reply	other threads:[~2012-05-23 12:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-23 11:54 doi proxy , a test patch Fabrice Pardo
2012-05-23 12:27 ` Jambunathan K [this message]
2012-05-23 13:04   ` Christian Moe
2012-05-23 15:12     ` Fabrice Pardo
2012-05-23 16:05       ` Christian Moe
2012-05-23 16:39       ` Jambunathan K
2012-05-24  8:50         ` Fabrice Pardo
2012-07-05 17:36           ` Bastien

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8162bnaxq0.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=fabrice.pardo@lpn.cnrs.fr \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).