From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: link abbreviation with multiple params, e. g. for geo locations Date: Sun, 5 May 2013 17:06:03 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZ0Vp-0003V6-Bv for emacs-orgmode@gnu.org; Sun, 05 May 2013 11:06:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZ0Vo-0000sK-Bh for emacs-orgmode@gnu.org; Sun, 05 May 2013 11:06:05 -0400 Received: from mail-la0-x235.google.com ([2a00:1450:4010:c03::235]:39085) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZ0Vo-0000rq-48 for emacs-orgmode@gnu.org; Sun, 05 May 2013 11:06:04 -0400 Received: by mail-la0-f53.google.com with SMTP id eo20so2705630lab.12 for ; Sun, 05 May 2013 08:06:03 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode Hi all I suggest that the Org link abbreviation supports multiple and repeated parameters so that it can handle more than the one and only parameter %s as of now. What I have in mind is to abbreviate the URL [[http://maps.google.com/maps?ll=4.56,7.89&spn=0.3,0.3&q=4.56,7.89]] this way : #+LINK: geo http://maps.google.com/maps?ll=%1&spn=%2,%2&q=%1 : [[geo:4.56,7.89&0.3]] where & in the Org link is the separator of the parameters %1 and %2. Note the repeated use of %1 and %2 in this case which is a good part of the convenience. I tried with a workaround URL that by itself would work [[http://maps.google.com/maps?ll=4.56,7.89&spn=0.3,0.3&q=4.56,7.89&spn=0.3,0.3]] with the repeated spn. But below the second %s remains without replacement which means the marker in the map gets lost when trying this with release_8.0.2-72-gccfe83: #+LINK: geo http://maps.google.com/maps?ll=%s&q=%s [[geo:4.56,7.89&spn=0.3,0.3]] Does it make sense to put at least repeatable %s, but then also multiple and repeatable parameters for link abbreviations to the wish list? Or did I miss something else that supports also org-open-at-point, maybe Org macros? I am not sure if %1 %2 etc. for the parameters is a good choice since it might interfere with escaped chars in #+LINK. Maybe &1 &2 etc. interfere less because the & to separate URL parameters are followed mostly by letters, as well as the & in HTML entities, AFAIK. Michael