From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: link abbreviation with multiple params, e. g. for geo locations Date: Tue, 07 May 2013 00:29:01 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZTr9-0005G2-1O for emacs-orgmode@gnu.org; Mon, 06 May 2013 18:26:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZTr7-0001iC-L7 for emacs-orgmode@gnu.org; Mon, 06 May 2013 18:26:02 -0400 Received: from mail-forward5.uio.no ([129.240.10.37]:37408) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZTr6-0001i3-Gk for emacs-orgmode@gnu.org; Mon, 06 May 2013 18:26:01 -0400 Received: from exim by mail-out5.uio.no with local-bsmtp (Exim 4.80.1) (envelope-from ) id 1UZTr3-0000JX-Sv for emacs-orgmode@gnu.org; Tue, 07 May 2013 00:25:57 +0200 In-reply-to: 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: Michael Brand Cc: Julien Danjou , Org Mode , Christian Moe 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