From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Re: Wishlist: allow range of table elements to be filled by sbe Date: Fri, 19 Aug 2011 22:46:03 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:50938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuVx8-0000If-HN for emacs-orgmode@gnu.org; Fri, 19 Aug 2011 16:46:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QuVx7-0002FE-CJ for emacs-orgmode@gnu.org; Fri, 19 Aug 2011 16:46:06 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:41977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuVx7-0002F7-6O for emacs-orgmode@gnu.org; Fri, 19 Aug 2011 16:46:05 -0400 Received: by wwf10 with SMTP id 10so2775555wwf.30 for ; Fri, 19 Aug 2011 13:46:03 -0700 (PDT) In-Reply-To: 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: =?ISO-8859-1?Q?Andr=E1s_Major?= Cc: emacs-orgmode Hi Andr=E1s I am not sure if you really need the data between the sh output and the sbe input as a table. If not, this can be used: #+source: shcode(x =3D 0) #+begin_src sh echo "$x" #+end_src | 1 | 2 | 3 | #+TBLFM: @1$1..@1$3 =3D '(sbe "shcode" (x "$#")) Michael 2011/8/19 Andr=E1s Major : > Hi, > > I'd like to use a babel code block to fill a table with values. =A0The > sbe elisp function looks like the right thing for this task, but it > appears that the result of the code block always goes into a single > cell of a table. =A0I can specify ranges of values, but then the entire > output is placed into each of the specified cells. > > Here is how I imagine things should work: > > #+srcname: shcode > #+begin_src sh :exports output table silent > =A0echo "1 2 3" > #+end_src > > | 1 | 2 | 3 | > #+TBLFM: $1..$3=3D'(sbe shcode) > > Note that this is *NOT* real output from the code block in the current > version of org-mode, it's what I want it to be. =A0There are two things > that cause this to break at the moment: > > - The range $1..$3 doesn't work, I have to prepend a row specifier as > =A0in @<$1..@>$3 or suchlike, which is rather counterintuitive but > =A0seems to work. > > - The output "1 2 3" are not separated into the various cells but all > =A0placed into each cell. > > Or am I doing something wrong here?