From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dror Atariah Subject: Re: [Orgmode] Unable to capture the file name generated using matplotlib Date: Tue, 26 May 2015 15:26:24 +0200 Message-ID: References: <87wq0qsy4o.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d041827f2afa7590516fc1216 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxEsJ-0006z1-EF for emacs-orgmode@gnu.org; Tue, 26 May 2015 09:26:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxEsD-0008Dz-Im for emacs-orgmode@gnu.org; Tue, 26 May 2015 09:26:31 -0400 Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:34784) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxEsD-0008Dq-5t for emacs-orgmode@gnu.org; Tue, 26 May 2015 09:26:25 -0400 Received: by wicmc15 with SMTP id mc15so64875038wic.1 for ; Tue, 26 May 2015 06:26:24 -0700 (PDT) In-Reply-To: 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 Cc: Nick Dokos , "emacs-orgmode@gnu.org" , Ken Mankoff --f46d041827f2afa7590516fc1216 Content-Type: text/plain; charset=UTF-8 On Mon, May 25, 2015 at 8:30 PM, John Kitchin wrote: > With emacs -Q, and this org file: > > #+BEGIN_SRC emacs-lisp > (org-babel-do-load-languages > 'org-babel-load-languages > '((emacs-lisp . t) > (python . t))) > #+END_SRC > > #+RESULTS: > > #+BEGIN_SRC python :session with_matplotlib :results file :exports both > import matplotlib > matplotlib.use('Agg') > import matplotlib.pyplot as plt > fig=plt.figure(figsize=(3,2)) # 4 > plt.plot([1,3,2]) # 3 > plt.savefig('myfig.png') # 2 > 'myfig.png' # 1 > #+END_SRC > > #+RESULTS: > [[file:myfig.png]] > > As I mentioned before, if I evaluate the second block as-is I get the error. However, if I comment out all the lines except #1 then the code returns the correct results block. Then, I started to add the numbered lines. Adding #2 and #3 still doesn't break the behavior. Once adding line #4 the behavior breaks. Maybe this observation can be helpful? This happens both when starting Emacs -Q or without -Q. --f46d041827f2afa7590516fc1216 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
--f46d041827f2afa7590516fc1216--