From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Kang Subject: Re: how i pass output of one codeblock as iinput of another codeblock without manual copy paste Date: Tue, 3 Jul 2012 11:10:28 -0400 Message-ID: References: <-8201756380585969276@unknownmsgid> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf302d49be9ab64b04c3ee50f8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:37792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm4kR-0003ar-Dg for emacs-orgmode@gnu.org; Tue, 03 Jul 2012 11:10:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sm4kI-0008RR-Iu for emacs-orgmode@gnu.org; Tue, 03 Jul 2012 11:10:38 -0400 Received: from mail-yx0-f169.google.com ([209.85.213.169]:51636) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm4kI-0008RC-Be for emacs-orgmode@gnu.org; Tue, 03 Jul 2012 11:10:30 -0400 Received: by yenr5 with SMTP id r5so6284478yen.0 for ; Tue, 03 Jul 2012 08:10:28 -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: "Thomas S. Dye" Cc: "emacs-orgmode@gnu.org" --20cf302d49be9ab64b04c3ee50f8 Content-Type: text/plain; charset=ISO-8859-1 Thank you, Tom. It works like a charm! Now, I will read the document one more time very carefully and throughly. James On Mon, Jul 2, 2012 at 7:25 PM, Thomas S. Dye wrote: > James Kang writes: > > > Hi, > > > > I have been using code blocks with the following way to pass one's > > output to the other's input(or input variable). > > You can notice that I am manually copying/pasting the contents of > > "RESULTS" and create a table with a name "my_table". > > Now, is there anyway I can do this passing the output automatically > > without manual copy/paste? > > > > Thanks > > (using orgmode 7.8) > > > > #+srcname: code1 > > #+begin_src sh :exports code :results value table > > Some codes here > > #+end_src > > > > #+RESULTS: > > |Good results| > > #+tblname: my_table ### this is copied from the previous results > manually > > |Good results| > > #+call: transpose(table=my_table) > > > > #+results: transpose(table=my_table) > > |Good results Processed by transpose| > Aloha James, > > The Org mode manual should answer your question: > > http://orgmode.org/manual/var.html#var > > You'll probably want to use #+name: code1 rather than #+srcname: code1 > > Once you've done that, then #+call: transpose(table=code1) ought to > work, if the Library of Babel is loaded or you have otherwise defined > transpose. > > All the best, > Tom > > -- > Thomas S. Dye > http://www.tsdye.com > --20cf302d49be9ab64b04c3ee50f8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thank you, Tom.
It works like a charm!
Now, I will read the document = one more time very carefully and throughly.

James



On Mon, Jul 2, 2012 at 7:25 PM, Thomas S. Dye <tsd@tsd= ye.com> wrote:
Jame= s Kang <marchkang@gmail.com&g= t; writes:

> Hi,
>
> I have been using code blocks with the following way to pass one's=
> output to the other's input(or input variable).
> You can notice that I am manually copying/pasting the contents of
> "RESULTS" and create a table with a name "my_table"= ;.
> Now, is there anyway I can do this passing the output automatically > without manual copy/paste?
>
> Thanks
> (using orgmode 7.8)
>
> #+srcname: code1
> #+begin_src sh :exports code :results value table
> =A0Some codes here
> #+end_src
>
> #+RESULTS:
> |Good results|
> #+tblname: my_table =A0 ### this is copied from the previous results m= anually
> |Good results|
> #+call: transpose(table=3Dmy_table)
>
> #+results: transpose(table=3Dmy_table)
> |Good results Processed by transpose|
Aloha James,

The Org mode manual should answer your question:

http:/= /orgmode.org/manual/var.html#var

You'll probably want to use #+name: code1 rather than #+srcname: code1<= br>
Once you've done that, then #+call: transpose(table=3Dcode1) ought to work, if the Library of Babel is loaded or you have otherwise defined
transpose.

All the best,
Tom

--
Thomas S. Dye
http://www.tsdye.com=

--20cf302d49be9ab64b04c3ee50f8--