From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Mikhail Titov" Subject: Re: python/babel inline images Date: Wed, 6 Jun 2012 14:16:34 -0500 Message-ID: <001801cd4418$e34e5d40$a9eb17c0$@us> References: <87pq9egifm.fsf@bye.fritz.box> <874nqp9580.fsf@gmx.com> <87ehpt8k1l.wl%william.lechelle@ens-lyon.fr> <87d35cwjrt.fsf@bye.fritz.box> Mime-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScLie-0007xR-Rg for emacs-orgmode@gnu.org; Wed, 06 Jun 2012 15:16:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ScLid-0007Fj-4q for emacs-orgmode@gnu.org; Wed, 06 Jun 2012 15:16:36 -0400 Received: from mailout-us.gmx.com ([74.208.5.67]:50789) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1ScLic-0007FW-Ta for emacs-orgmode@gnu.org; Wed, 06 Jun 2012 15:16:35 -0400 In-Reply-To: <87d35cwjrt.fsf@bye.fritz.box> Content-Language: en-us 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: 'henry atting' , emacs-orgmode@gnu.org > -----Original Message----- > From: emacs-orgmode-bounces+mlt=gmx.us@gnu.org [mailto:emacs-orgmode- > bounces+mlt=gmx.us@gnu.org] On Behalf Of henry atting > Sent: Wednesday, June 06, 2012 10:19 AM > To: emacs-orgmode@gnu.org > Subject: Re: [O] python/babel inline images > > I don't think its a path problem. Indeed #+begin_src python :results output import os print(os.getcwd()) #+end_src Shows location of my org doc. > The code itself works flawlessly. So > the workaround which I already have used is to link to the resulting > image. The only drawback with this solution is that after every > evaluation I have to remove the empty `'Results:' You can use :results silent > but the heck with > it, I can live with it happily till the end of my days. > However I find that some inconsistency lies therein. Before > python/matplotlib I used gnuplot with which babel had no problem of > this type. Try using ... :file exp_csv.svg ... plot.savefig(file=sys.stdout) #+begin_src python :results output :file zzz.xxx import os, sys print(os.getcwd(), file=sys.stdout) #+end_src #+RESULTS: [[file:zzz.xxx]] Meanwhile I've noticed that I can't return back from editing python code in a sub-editing buffer. C-c ' does not work and M-x org-edit-src-exit says "This is not a sub-editing buffer, something is wrong".