emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christian Moe <mail@christianmoe.com>
To: Michael Brand <michael.ch.brand@gmail.com>
Cc: Julien Danjou <julien@danjou.info>,
	Org Mode <emacs-orgmode@gnu.org>,
	Christian Moe <mail@christianmoe.com>
Subject: Re: link abbreviation with multiple params, e. g. for geo locations
Date: Tue, 07 May 2013 00:29:01 +0200	[thread overview]
Message-ID: <m2li7reo9v.fsf@uio.no> (raw)
In-Reply-To: <CALn3zojeHoYedWMt_g0u+wis+FU4FXZsbsrszpqoSfBd_x7tUw@mail.gmail.com>


Michael Brand writes:
>
> Thinking about this and my previous post I conclude that Org babel is
> just perfect for my use case.

If you want to pass a variety of named parameters, that may be true.

On the other hand, since you end up typing the parameter names anyway,
the absolutely simplest way to get the behavior you want might simply be
something like:

: #+LINK: gmap http://maps.google.ch/maps?

: [[gmap:t=p&spn=0.2,0.2&ll=13.0,14.3&q=13.0,14.3]]

>  Well, as a beginner of Org babel I am
> not yet there completely and would like to ask for help on the source
> block header:
> [...]
> The issue is that org-entry-get returns nil instead of the value of
> the item property :geo:, therefore my "demo workaround" with the "or"
> to show the principle of "gmb". How to resolve this properly?

For starters, see the docstring for org-entry-get; it expects a
point-or-marker as the first argument, but you are passing nil. 

I'm afraid knowing that doesn't help much. The problem is, you don't know
what point the inline call is at, so you cannot point org-entry-get to
the right entry. If you try

: (org-entry-get (point) "geo")

it will look for a geo property in the outline entry the source block is
in, not in the entry the call comes from.

I don't know any easy way to pass a parameter to a source block from an
outline entry property via an inline call in that entry. Others may know
better.

>
> Isn't there something like "#+HEADER: :var geo_var=:geo:" to copy the
> value of the item property :geo: to the babel variable unless
> specified by the caller?

Afraid not. 

Yours,
Christian

  reply	other threads:[~2013-05-06 22:26 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-05 15:06 link abbreviation with multiple params, e. g. for geo locations Michael Brand
2013-05-06  7:06 ` Christian Moe
2013-05-06 18:42   ` Michael Brand
2013-05-06 22:29     ` Christian Moe [this message]
  -- 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=m2li7reo9v.fsf@uio.no \
    --to=mail@christianmoe.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=julien@danjou.info \
    --cc=michael.ch.brand@gmail.com \
    /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).