From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Re: [babel] Executing sh-code Date: Wed, 02 Dec 2009 13:16:45 -0700 Message-ID: References: <87k4xey99s.fsf@mundaneum.com> <200911271900.08393.torsten.wagner@googlemail.com> <87ws1cgsd6.fsf@mundaneum.com> <877htb4uow.fsf@stats.ox.ac.uk> <87638tnivd.fsf@mundaneum.com> <87r5rdzar4.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NFvd8-0007sW-Ui for emacs-orgmode@gnu.org; Wed, 02 Dec 2009 15:16:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NFvd4-0007mY-DG for emacs-orgmode@gnu.org; Wed, 02 Dec 2009 15:16:54 -0500 Received: from [199.232.76.173] (port=42234 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFvd4-0007mP-0q for emacs-orgmode@gnu.org; Wed, 02 Dec 2009 15:16:50 -0500 Received: from mail-pz0-f193.google.com ([209.85.222.193]:59629) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NFvd3-0008Nl-It for emacs-orgmode@gnu.org; Wed, 02 Dec 2009 15:16:49 -0500 Received: by pzk31 with SMTP id 31so446593pzk.28 for ; Wed, 02 Dec 2009 12:16:48 -0800 (PST) In-Reply-To: <87r5rdzar4.fsf@mundaneum.com> (=?utf-8?Q?=22S=C3=A9bastien?= Vauban"'s message of "Wed, 02 Dec 2009 15:55:11 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?utf-8?Q?S=C3=A9bastien?= Vauban Cc: emacs-orgmode@gnu.org S=C3=A9bastien Vauban writes: > Hi Eric, > > "Eric Schulte" wrote: >> S=C3=A9bastien Vauban writes: >>> >>> What's the impact of specifying "sh" or "bash" for the snippet? >> >> While "sh" blocks should work "bash" blocks will not be recognized. In >> org-babel "sh" doesn't explicitly mean the "sh" command, but rather means >> 'run shell' which will default to whatever shell you have configured. > > I wonder if it wouldn't be beneficial to make such a feature explicit. I = think > the right shell environment cannot be guessed at runtime. Am I right? > Hmm, currently we just use the `shell' command which defaults to the user's defined shell. I would have to investigate as to how to explicitly specify a particular shell to run, but I certainly do see your point that there are times when an explicit shell environment would be desirable. I'll create a TODO to reflect this need. > > Let's imagine two use cases: > > 1. I only have zsh on my machine, and I'm writing a document with bash co= de > blocks. What if the user executing them is using zsh as his default sh= ell? > > 2. I have both bash and zsh installed on my machine. I want to write some= code > blocks in bash, and other in zsh. How can I make the difference explic= it? > > BTW, a "needed" feature is the executable flag for shell scripts. I found= a > reference to it ("PROPOSED make tangled files executable? At least if usi= ng > shebang line") on http://orgmode.org/worg/org-contrib/babel/development.p= hp. > Yes, I agree that this should be implemented, patches are welcome :) Thanks for the very useful feedback, hopefully we'll be able to make some progress in these areas soon. Best -- Eric > > Thanks anyway for your marvelous tool (replacing my need for Nuweb, and g= iving > me much more opportunities), > Seb