emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: emacs-orgmode@gnu.org
Subject: Re: evaluation context in call statements
Date: Wed, 26 Jun 2013 08:29:50 +0200	[thread overview]
Message-ID: <87fvw5fkpt.fsf@Rainer.invalid> (raw)
In-Reply-To: 87ip11h2zq.fsf@gmail.com

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	other threads:[~2013-06-26  6:30 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25 17:34 evaluation context in call statements Rick Frankel
2013-06-25 19:21 ` Achim Gratz
2013-06-25 19:53   ` Achim Gratz
2013-06-25 20:06     ` Achim Gratz
2013-06-25 20:07     ` Michael Brand
2013-06-25 20:20       ` Achim Gratz
2013-06-25 20:55         ` Achim Gratz
2013-06-25 22:41         ` Eric Schulte
2013-06-26  6:29           ` Achim Gratz [this message]
2013-06-26 14:38             ` Rick Frankel
2013-06-26 15:13               ` Nicolas Goaziou
2013-06-26 15:29                 ` Rick Frankel
2013-06-26 15:49                   ` Eric Schulte
2013-06-26 15:06             ` Eric Schulte
2013-06-27  4:55               ` Achim Gratz
2013-06-27  6:22                 ` Andreas Leha
2013-06-27 14:27                   ` Achim Gratz
2013-06-27 23:12                     ` Andreas Leha
2013-06-30 22:24                 ` Eric Schulte
2013-07-01 10:23                   ` Michael Brand
2013-07-01 13:11                     ` Eric Schulte
2013-07-01 13:52                       ` Michael Brand
2013-07-01 14:10                         ` Eric Schulte
2013-06-26  8:38           ` Michael Brand
2013-06-26 14:54             ` Eric Schulte
2013-06-26 16:53               ` Michael Brand
2013-06-26 17:11                 ` Eric Schulte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fvw5fkpt.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).