From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: evaluation context in call statements Date: Wed, 26 Jun 2013 08:29:50 +0200 Message-ID: <87fvw5fkpt.fsf@Rainer.invalid> References: <444ea6cff489e2adc97092bdac881aef@mail.rickster.com> <878v1y574d.fsf@Rainer.invalid> <874ncm55ma.fsf@Rainer.invalid> <87r4fq3ptf.fsf@Rainer.invalid> <87ip11h2zq.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrjF2-0005MA-GS for emacs-orgmode@gnu.org; Wed, 26 Jun 2013 02:30:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrjEx-0005q1-1x for emacs-orgmode@gnu.org; Wed, 26 Jun 2013 02:30:08 -0400 Received: from plane.gmane.org ([80.91.229.3]:51223) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrjEw-0005k2-Rm for emacs-orgmode@gnu.org; Wed, 26 Jun 2013 02:30:02 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UrjEu-0007M2-UR for emacs-orgmode@gnu.org; Wed, 26 Jun 2013 08:30:00 +0200 Received: from pd9eb23b7.dip0.t-ipconnect.de ([217.235.35.183]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 26 Jun 2013 08:30:00 +0200 Received: from Stromeko by pd9eb23b7.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 26 Jun 2013 08:30:00 +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 Eric Schulte writes: > In defense of the existing behavior, I don't see the benefit of calling > a code block with the same arguments from multiple locations and > subsequently littering a file with multiple identical results blocks. I agree that this didn't make all that much sense in the past, but with property evaluation and elisp argument evaluation now anchored to the point of call, the hierarchical position of the call could and (as the test case from Rick) will be used to distinguish between invocations with the same arguments. Since the current way to find the results doesn't know anything about this, it will generally not do the right thing anymore. Note that calls using a session had that property all the time: multiple calls with the same arguments into the same session are useful, but Babel would only keep the last result. > If we do want to change this behavior it would be nice to check the > email list archives to see if/when the existing behavior has been > defended in the past. If you'd happen to know when that was introduced? > My only thought about a :target header argument is that it would need to > be implemented for other types of code blocks as well, which could lead > to very confusing behavior if we have a named code block with a :target > header argument which differs from the name. Oh yes, the specification of that would be interesting. I'll try to see how this "beam the result anywhere" functionality sprang into existence and what the intended use case was (I expect something to do with sessions). My current suggestion is however to limit the results block search to the same subtree and stop searching at later #+CALL and #+BEGIN_SRC line. We could make this conditional on a :[no]clobber argument to keep compatibility with the current behaviour (clobbering the first result would be the current and perhaps default behaviour). > Also, if the target is referenced, would the #+call line be re-run? Not any more that a reference to a named result would re-run its source block. > My vote is for adding #+name support to call lines, and then handling > their results in the same manner as code block results. I'm not sure what this would entail other than replacing the call with its arguments with the name of the call in the results line. But yes, that'd be a step forward, although you'd have to be careful when copying calls. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf microQ V2.22R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada