From mboxrd@z Thu Jan  1 00:00:00 1970
From: Eric Schulte <eric.schulte@gmx.com>
Subject: Re: python/babel inline images
Date: Tue, 05 Jun 2012 23:19:37 -0600
Message-ID: <878vg0bbwm.fsf@gmx.com>
References: <87pq9egifm.fsf@bye.fritz.box> <874nqp9580.fsf@gmx.com>
	<007401cd437f$ab542b20$01fc8160$@us>
Mime-Version: 1.0
Content-Type: text/plain
Return-path: <emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org>
Received: from eggs.gnu.org ([208.118.235.92]:35611)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eric.schulte@gmx.com>) id 1ScJpA-0000wY-KV
	for emacs-orgmode@gnu.org; Wed, 06 Jun 2012 13:15:18 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eric.schulte@gmx.com>) id 1ScJp8-0005LH-Lf
	for emacs-orgmode@gnu.org; Wed, 06 Jun 2012 13:15:12 -0400
Received: from mailout-us.gmx.com ([74.208.5.67]:54526
	helo=mailout-us.mail.com) by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <eric.schulte@gmx.com>) id 1ScJp8-0005In-Dt
	for emacs-orgmode@gnu.org; Wed, 06 Jun 2012 13:15:10 -0400
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=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: Mikhail Titov <mlt@gmx.us>
Cc: emacs-orgmode@gnu.org, 'henry atting' <nsmp_06@online.de>

"Mikhail Titov" <mlt@gmx.us> writes:

>> -----Original Message-----
>> From: emacs-orgmode-bounces+mlt=gmx.us@gnu.org [mailto:emacs-orgmode-
>> bounces+mlt=gmx.us@gnu.org] On Behalf Of Eric Schulte
>> Sent: Tuesday, June 05, 2012 9:57 AM
>> To: henry atting
>> Cc: emacs-orgmode@gnu.org
>> Subject: Re: [O] python/babel inline images
>> 
>> I'm not python expert, but the code block should be run in your current
>> directory, e.g., the following outputs the current working path expected
>> for me.
>> 
>> #+begin_src sh
>>   pwd
>> #+end_src
>> 
>> If you want to explicitly pass the current directory to your code block
>> as an argument, you could try something like the following
>> 
>> #+begin_src python :var mydir=(file-name-directory (buffer-file-name))
>>   return mydir
>> #+end_src
>> 
>
> I've noticed some inconsistency between various languages in this aspect.
> For instance, ob-R starts session in proper working directory, while all
> looks like everything (?) else does not.
>
> Should not it be somewhat standardized? I think it make sense to always cd
> to org doc folder.
>

Most languages should and (at least those I use regularly) do run in the
directory of the containing Org-mode file.  Which languages do not?

Thanks,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte