From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Unexpected behaviour with gnuplot source blocks Date: Sat, 22 Jun 2013 14:10:26 -0600 Message-ID: <8761x5zfey.fsf@gmail.com> References: <87ip18sqv6.fsf@gmail.com> <87txkrqzgb.fsf@gmail.com> <87vc56w2v5.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uqamm-0004YC-Bb for emacs-orgmode@gnu.org; Sat, 22 Jun 2013 23:16:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uqaml-0006ZE-0l for emacs-orgmode@gnu.org; Sat, 22 Jun 2013 23:16:16 -0400 Received: from mail-pb0-x22c.google.com ([2607:f8b0:400e:c01::22c]:42951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uqamk-0006ZA-Pc for emacs-orgmode@gnu.org; Sat, 22 Jun 2013 23:16:14 -0400 Received: by mail-pb0-f44.google.com with SMTP id uo1so9498805pbc.31 for ; Sat, 22 Jun 2013 20:16:13 -0700 (PDT) In-Reply-To: <87vc56w2v5.fsf@Rainer.invalid> (Achim Gratz's message of "Sat, 22 Jun 2013 18:02:06 +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: Achim Gratz Cc: emacs-orgmode@gnu.org Achim Gratz 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. >=20 > 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:=E2=80=A6) in the same capaci= ty. > 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. --=20 Eric Schulte http://cs.unm.edu/~eschulte