emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] link abbreviation with multiple params, e. g. for geo locations


From: Michael Brand
Subject: [O] link abbreviation with multiple params, e. g. for geo locations
Date: Sun, 5 May 2013 17:06:03 +0200

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]