From mboxrd@z Thu Jan  1 00:00:00 1970
From: Eric Schulte <eric.schulte@gmx.com>
Subject: Re: [babel] session initialization (was RE: python/babel inline
 images)
Date: Wed, 06 Jun 2012 13:01:49 -0600
Message-ID: <87ehpsqn5v.fsf@gmx.com>
References: <87pq9egifm.fsf@bye.fritz.box> <874nqp9580.fsf@gmx.com>
	<007401cd437f$ab542b20$01fc8160$@us> <878vg0bbwm.fsf@gmx.com>
	<000001cd440b$8d20abb0$a7620310$@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]:60150)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eric.schulte@gmx.com>) id 1ScLVH-0004Eb-56
	for emacs-orgmode@gnu.org; Wed, 06 Jun 2012 15:02:52 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eric.schulte@gmx.com>) id 1ScLVE-0003xW-Jc
	for emacs-orgmode@gnu.org; Wed, 06 Jun 2012 15:02:46 -0400
Received: from mailout-us.gmx.com ([74.208.5.67]:39530
	helo=mailout-us.mail.com) by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <eric.schulte@gmx.com>) id 1ScLVE-0003xI-D2
	for emacs-orgmode@gnu.org; Wed, 06 Jun 2012 15:02:44 -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>, 'Eric Schulte' <eric.schulte@gmx.com>

>> 
>> 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?
>
> I'm working on ob-octave.el which does not. So I'll fix it in this
> case.

Great, thanks.

> 
> Which leads me to another question I was about to ask. How to comint
> commands in org-babel-XXX-initiate-session as session is not assigned
> yet?

I don't understand.

> Right now I have something like the following in that function
>
> 	  (comint-send-string
> 	   (get-buffer-process (current-buffer))
> 	  		       "set(0, 'defaultfigurevisible', 'off');\n")
>
> I do it there as it does not make sense to call for each block. I was about
> to write that ob-R does show stuff but I believe it was in earlier versions
> of ob-R.el or something as I've checked and indeed nothing appears on screen
> as code being wrapped in a device output block.
>

I'm not aware of a way to run code on the start of a session.  I do see
how this could be a useful addition.

>
> Also IIRC ob-sh does not change directory though I tried it on Windows with
> cmd.exe.

Granted I only run on linux, but (on linux) ob-sh *does* run in the
directory of the containing Org-mode file.

> Worth mentioning that it tangles into dot sh instead of dot bat or dot
> cmd on that platform. It misses platform specific
>
> (defvar org-babel-tangle-lang-exts) 
> (if (string-equal system-type "windows-nt") 
>   (add-to-list 'org-babel-tangle-lang-exts '("sh" . "bat"))
> )
>

OK, could you convert the above into a patch which we could apply to
ob-sh?

>
> P.S. I feel like I'm hijacking the thread....
>
> M.
>

I am certainly not the OP, but I don't mind, these varied topics all
seem important.

Cheers,

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