emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Wishlist: allow range of table elements to be filled by sbe


From: Michael Brand
Subject: Re: [O] Wishlist: allow range of table elements to be filled by sbe
Date: Fri, 19 Aug 2011 22:46:03 +0200

Hi András

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 = 0)
#+begin_src sh
  echo "$x"
#+end_src

| 1 | 2 | 3 |
#+TBLFM: @address@hidden = '(sbe "shcode" (x "$#"))

Michael

2011/8/19 András Major <address@hidden>:
> Hi,
>
> I'd like to use a babel code block to fill a table with values.  The
> 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.  I 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
>  echo "1 2 3"
> #+end_src
>
> | 1 | 2 | 3 |
> #+TBLFM: $1..$3='(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.  There 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
>  in @<$1..@>$3 or suchlike, which is rather counterintuitive but
>  seems to work.
>
> - The output "1 2 3" are not separated into the various cells but all
>  placed into each cell.
>
> Or am I doing something wrong here?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]