From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: evaluation context in call statements Date: Tue, 25 Jun 2013 21:21:22 +0200 Message-ID: <878v1y574d.fsf@Rainer.invalid> References: <444ea6cff489e2adc97092bdac881aef@mail.rickster.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrYo6-00036z-BQ for emacs-orgmode@gnu.org; Tue, 25 Jun 2013 15:21:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrYo3-000286-GQ for emacs-orgmode@gnu.org; Tue, 25 Jun 2013 15:21:38 -0400 Received: from plane.gmane.org ([80.91.229.3]:48022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrYo3-00027p-8G for emacs-orgmode@gnu.org; Tue, 25 Jun 2013 15:21:35 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UrYo2-0004nX-Ac for emacs-orgmode@gnu.org; Tue, 25 Jun 2013 21:21:34 +0200 Received: from pd9eb0ccd.dip0.t-ipconnect.de ([217.235.12.205]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 25 Jun 2013 21:21:34 +0200 Received: from Stromeko by pd9eb0ccd.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 25 Jun 2013 21:21:34 +0200 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: emacs-orgmode@gnu.org Rick Frankel writes: > The arguments to a `#+call' line are evaluated in the context of the > called block and not the calling block. This seems like a bug to me. For > example, in the following i would expect the `call' to return "Call" and > not "Source" as the results: Tody's your lucky day because Eric just fixed this. There's a bug with finding the #+RESULTS line though: --8<---------------cut here---------------start------------->8--- * Babel LOC ** Source #+name: message #+BEGIN_SRC elisp :var m="foo" m #+END_SRC #+RESULTS: message : foo ** Call 1 #+call: message(m=(nth 4 (org-heading-components))) #+RESULTS: message(m=(nth 4 (org-heading-components))) : Call 2 ** Call 2 #+call: message(m=(nth 4 (org-heading-components))) --8<---------------cut here---------------end--------------->8--- Executing Call#2 will update the #+RESULTS for Call#1 (or actually the first matching #+RESULTS cookie in the whole document). I'd think it should also start looking for the results line from the point of call. I don't really get why it does this, maybe Eric knows where to look. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory and User Sound Singles for Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds