From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: [Orgmode] Unable to capture the file name generated using matplotlib Date: Sat, 02 May 2015 13:09:59 -0400 Message-ID: <871tiyucrc.fsf@alphaville.usersys.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yoavg-0003bn-PN for emacs-orgmode@gnu.org; Sat, 02 May 2015 13:10:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yoavd-0004av-Jr for emacs-orgmode@gnu.org; Sat, 02 May 2015 13:10:16 -0400 Received: from plane.gmane.org ([80.91.229.3]:55723) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yoavd-0004am-Cs for emacs-orgmode@gnu.org; Sat, 02 May 2015 13:10:13 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Yoava-0003zm-Mo for emacs-orgmode@gnu.org; Sat, 02 May 2015 19:10:10 +0200 Received: from pool-108-7-223-120.bstnma.fios.verizon.net ([108.7.223.120]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 02 May 2015 19:10:10 +0200 Received: from ndokos by pool-108-7-223-120.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 02 May 2015 19:10:10 +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: emacs-orgmode@gnu.org Dror Atariah writes: > Consider the following example (from the documentation): > > -------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<------- > #+begin_src python :session :results file > import matplotlib > matplotlib.use('Agg') > import matplotlib.pyplot as plt > fig=plt.figure(figsize=(3,2)) > plt.plot([1,3,2]) > fig.tight_layout() > plt.savefig('images/myfig.pdf') > 'images/myfig.pdf' # return this to org-mode > #+end_src > -------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<------- > > It should return something like  > > -------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<------- > #+RESULTS: > [[file:images/myfig.pdf]] > -------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<------- > > But for me it returns merely  > > -------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<------- > #+RESULTS: > [[file:]] > -------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<------- > > That is, it doesn't capture the file name that should be the last evaluation. > > How can I solve this problem? What version are you running? For me, it works fine: Org-mode version 8.3beta (release_8.3beta-1023-g49e054 @ /home/nick/elisp/org-mode/lisp/) Nick