From: Michael Brand <michael.ch.brand@gmail.com>
To: "András Major" <andras.g.major@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Wishlist: allow range of table elements to be filled by sbe
Date: Fri, 19 Aug 2011 22:46:03 +0200 [thread overview]
Message-ID: <CALn3zoiFQnyWyjBbR5PQEAtcuAdYvHDCFupZG7UgNzXpjnByvw@mail.gmail.com> (raw)
In-Reply-To: <CALPHr6wq9F4J_=92KwaRXhTrec625Wts=c4neckNrPD314xq5Q@mail.gmail.com>
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: @1$1..@1$3 = '(sbe "shcode" (x "$#"))
Michael
2011/8/19 András Major <andras.g.major@gmail.com>:
> 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?
prev parent reply other threads:[~2011-08-19 20:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-19 7:22 Wishlist: allow range of table elements to be filled by sbe András Major
2011-08-19 13:17 ` Eric Schulte
2011-08-19 18:59 ` András Major
2011-08-19 22:22 ` Eric Schulte
2011-08-19 20:46 ` Michael Brand [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CALn3zoiFQnyWyjBbR5PQEAtcuAdYvHDCFupZG7UgNzXpjnByvw@mail.gmail.com \
--to=michael.ch.brand@gmail.com \
--cc=andras.g.major@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).