Achim Gratz <strom...@nexgo.de> writes:

> Eric Schulte writes:
>>> #+BEGIN_SRC gnuplot :file test.eps
>>>   reset
>>       ^
>>   WRT |, I've also added the *org-babel-gnuplot-prefix* variable, which
>> may be set to e.g., "reset" to reset the gnuplot process between code
>> blocks.
>
> We have recently introduced similar functionality in ob-perl and it
> probably deserves a more general treatment and easier customization.
> Doing these things with defcustoms or defvars should be shunned, since
> it makes Org files using these options inherently unportable and
> non-self-contained.
>

Agreed.

>
> For the functionality that is implemented here, I'd think two new
> general header arguments are appropriate, namely :prolog and :epilog,

I've added prologue and epilogue header arguments.  They are implemented
for gnuplot and any language which uses `org-babel-expand-body:generic'.

The particular case of closing the gnuplot output terminal does not use
the epilogue, but rather happens automatically only in those cases in
which the output is explicitly set.

> 
> which should take the name of a source block (same language), a
> literal string in quotes, the result of an inline call of another
> source block and inline elisp (the result of execution must be in the
> appropriate syntax) as an argument.  We might need some friendlier way
> than elisp if we want to use URL (esp. file:…) in the same capacity.
> For session execution there may be a need to distibguish between the
> session start, subsequent invocations and perhaps closing of the
> session (we don't have that at the moment, I think).
>

I think standard header arguments should suffice.

Thanks,

>
>
> Regards,
> Achim.

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

Reply via email to