emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] evaluation context in call statements


From: Achim Gratz
Subject: Re: [O] evaluation context in call statements
Date: Wed, 26 Jun 2013 08:29:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

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




reply via email to

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