emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Brand <michael.ch.brand@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: link abbreviation with multiple params, e. g. for geo locations
Date: Sun, 5 May 2013 17:06:03 +0200	[thread overview]
Message-ID: <CALn3zojY_HRoW82GjPOOBvq+J3-Rie5qX1OY09O-4u3UJ13Wiw@mail.gmail.com> (raw)

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	other threads:[~2013-05-05 15:06 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-05 15:06 Michael Brand [this message]
2013-05-06  7:06 ` link abbreviation with multiple params, e. g. for geo locations Christian Moe
2013-05-06 18:42   ` Michael Brand
2013-05-06 22:29     ` Christian Moe
  -- strict thread matches above, loose matches on Subject: below --
2013-05-22 17:03 Michael Brand
2013-05-29 16:14 ` Michael Brand
2013-06-05 17:19   ` Michael Brand
2013-06-06 17:01 ` Eric Schulte
2013-06-07 14:53   ` Michael Brand
2013-06-07 15:18     ` Eric Schulte
2013-06-07 19:16       ` Michael Brand
2013-06-07 19:54         ` Vitalie Spinu
2013-06-08 18:05           ` Eric Schulte
2013-06-08 18:52             ` Vitalie Spinu
2013-06-08 19:21               ` Eric Schulte
2013-06-14 17:54                 ` Michael Brand
2013-06-14 18:18                   ` Eric Schulte
2013-06-14 20:13                     ` Michael Brand
2013-06-19  9:39                       ` Michael Brand
2013-06-07 20:10         ` Achim Gratz
2013-06-08 18:03         ` Eric Schulte
2013-06-09  7:56           ` Michael Brand
2013-06-09  8:07             ` Michael Brand
2013-06-09 19:18             ` Eric Schulte
2013-06-09 20:32               ` Michael Brand
2013-06-11 13:12                 ` Eric Schulte

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=CALn3zojY_HRoW82GjPOOBvq+J3-Rie5qX1OY09O-4u3UJ13Wiw@mail.gmail.com \
    --to=michael.ch.brand@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).