emacs-orgmode
[Top][All Lists]
Advanced

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

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


From: Christian Moe
Subject: Re: [O] link abbreviation with multiple params, e. g. for geo locations
Date: Tue, 07 May 2013 00:29:01 +0200
User-agent: mu4e 0.9.9.5-dev6; emacs 24.3.1

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 via email to

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