From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pascal Fleury Subject: Re: [PATCH] ob-shell Date: Wed, 21 Jan 2015 23:58:28 +0100 Message-ID: References: <86vbsycepz.fsf@somewhere.org> <87tx8iks22.fsf@bzg.ath.cx> <86ppi6qnb5.fsf@somewhere.org> <87vbrxx4zr.fsf@Rainer.invalid> <86ppi5uwgl.fsf@somewhere.org> <877g4cacn9.fsf@Rainer.invalid> <87vbrt8hpo.fsf_-_@Rainer.invalid> <87ha3ck9as.fsf@gmail.com> <87bns0gho2.fsf@Rainer.invalid> <8761hke6ff.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=047d7b5d869369da4a050d317e21 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YE4EM-0007e2-5J for emacs-orgmode@gnu.org; Wed, 21 Jan 2015 17:58:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YE4EI-0002ap-TQ for emacs-orgmode@gnu.org; Wed, 21 Jan 2015 17:58:34 -0500 Received: from mail-wi0-f173.google.com ([209.85.212.173]:44187) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YE4EI-0002aI-L0 for emacs-orgmode@gnu.org; Wed, 21 Jan 2015 17:58:30 -0500 Received: by mail-wi0-f173.google.com with SMTP id r20so38104993wiv.0 for ; Wed, 21 Jan 2015 14:58:29 -0800 (PST) In-Reply-To: <8761hke6ff.fsf@Rainer.invalid> 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: Achim Gratz Cc: emacs orgmode-mailinglist --047d7b5d869369da4a050d317e21 Content-Type: multipart/alternative; boundary=047d7b5d869369da43050d317e1f --047d7b5d869369da43050d317e1f Content-Type: text/plain; charset=UTF-8 Hello, Here is a patch that will figure out the version of bash in a less fork-y way. It keeps the result in a variable after having gotten it the first time by indeed forking to bash. --Pascal On Fri, Aug 22, 2014 at 8:16 PM, Achim Gratz wrote: > Pascal Fleury writes: > > Please forget about the previous patch I submitted, I have a new one > > that should work now on all platforms. > > Let me know if it should be formatted differently. > > You don't really want to fork into bash each time you're about to run a > shell code block just to find out if it suppports associative arrays. > This needs to be determined at customization time. > > Regards, > Achim. > -- > +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ > > Factory and User Sound Singles for Waldorf Q+, Q and microQ: > http://Synth.Stromeko.net/Downloads.html#WaldorfSounds > > > --047d7b5d869369da43050d317e1f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,

Here is a patch that will figure= out the version of bash in a less fork-y way.
It keeps the resul= t in a variable after having gotten it the first time by indeed forking to = bash.

--Pascal

On Fri, Aug 22, 2014 at 8:16 PM, Achim Gr= atz <Stromeko@nexgo.de> wrote:
Pascal Fleury writes:
> Please forget about the previous patch I submitted, I have a new one > that should work now on all platforms.
> Let me know if it should be formatted differently.

You don't really want to fork into bash each time you're abo= ut to run a
shell code block just to find out if it suppports associative arrays.
This needs to be determined at customization time.

Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+<= br>
Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds



--047d7b5d869369da43050d317e1f-- --047d7b5d869369da4a050d317e21 Content-Type: application/octet-stream; name="0001-PATCH-ob-shell.el-now-emits-associative-array-code-o.patch" Content-Disposition: attachment; filename="0001-PATCH-ob-shell.el-now-emits-associative-array-code-o.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i57bari70 RnJvbSA5OTNjOGUxZGE3OWMyMjlhNjBhYTc2YWRlNjQ3ODA0ODRhNDA1ZGYwIE1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