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: Eric Schulte
Subject: Re: [O] evaluation context in call statements
Date: Wed, 26 Jun 2013 08:54:42 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Michael Brand <address@hidden> writes:

> Hi Eric
>
> On Wed, Jun 26, 2013 at 12:41 AM, Eric Schulte <address@hidden> wrote:
>> I think we could be well served by discussing how people use call lines,
>> how they would use call lines (if this behavior changed), and what
>> behavior would best support these existing and potential use cases.
>
> You did not yet answer to what I asked you about more than one call
> with the same arguments:
> http://thread.gmane.org/gmane.emacs.orgmode/72513/focus=73547
>

They will overwrite eachother's results.  We are currently discussing
alternatives which would change this behavior.

>
>> 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.
>
> Such result blocks do not have to be necessarily identical. What would
> you suggest for these examples?:
>
> 1) It could be just me feeling like to be on the playground:
>    -------------------------------------------------------------------
>    #+NAME: i_am_curious_how_this_works
>    #+BEGIN_SRC emacs-lisp
>      (format "%s" org-babel-current-src-block-location)
>    #+END_SRC
>
>    #+CALL: i_am_curious_how_this_works()
>
>    #+RESULTS: i_am_curious_how_this_works()
>    : #<marker at 124 in tmp.org>
>    #+CALL: i_am_curious_how_this_works()
>
>    (Here I expect to see the result "#<marker at 235 in tmp.org>".)
>    -------------------------------------------------------------------
>

This works as expected.  Depending on the call line executed, I get
different points in the second results.

>
> 2) My use case mentioned at the beginning of this message.
>

Currently if you want have separate results for call lines with the same
variables you will need to use a dummy variable.  I'd suggest an OS
variable if you are running them on different operating systems.

>
> Michael

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



reply via email to

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