From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Unexpected behaviour with gnuplot source blocks Date: Fri, 21 Jun 2013 09:02:28 -0600 Message-ID: <87txkrqzgb.fsf@gmail.com> References: <87ip18sqv6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uq2sG-0004c0-W8 for emacs-orgmode@gnu.org; Fri, 21 Jun 2013 11:03:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uq2sF-0006Zu-4w for emacs-orgmode@gnu.org; Fri, 21 Jun 2013 11:03:40 -0400 Received: from mail-pa0-x22d.google.com ([2607:f8b0:400e:c03::22d]:59872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uq2sE-0006ZC-SE for emacs-orgmode@gnu.org; Fri, 21 Jun 2013 11:03:39 -0400 Received: by mail-pa0-f45.google.com with SMTP id bi5so7959071pad.32 for ; Fri, 21 Jun 2013 08:03:38 -0700 (PDT) In-Reply-To: (Christopher Witte's message of "Fri, 21 Jun 2013 13:17:05 +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: Christopher Witte Cc: Org Mode Christopher Witte writes: > On 20 June 2013 18:12, Eric Schulte wrote: > >> Why not do the following instead which would be equivalent and simpler. >> The output will be automatically set from the value of your :file header >> argument. >> >> #+begin_src gnuplot :file fig/transInc.eps >> reset >> set encoding utf8 >> ..... >> #+end_src >> >> > That kinda works, but I think you still need to set the terminal type > within the source block. Using the above the command "set terminal eps" > gets sent to gnuplot, but you actually need "set terminal postscript eps". > I've added a customization variable to ob-gnuplot which may be used to map file extensions to terminals. Currently it just holds the mapping from eps to "postscript eps" ;; -*- emacs-lisp -*- (defcustom *org-babel-gnuplot-terms* '((eps . "postscript eps")) "List of file extensions and the associated gnuplot terminal." :group 'org-babel :type '(repeat (cons (symbol :tag "File extension") (string :tag "Gnuplot terminal")))) If anyone knows of other good default mapping to add please let me know. > > The following works > > #+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. Thanks for the feedback. > > set terminal postscript eps > ..... > #+END_SRC > > Thanks for the help! > Chris. -- Eric Schulte http://cs.unm.edu/~eschulte