From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rehan Iftikhar Subject: [babel] Parse another code block's output then use captured data in another code block Date: Fri, 7 Mar 2014 07:23:43 -0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1136776ad5ca7e04f405d633 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLwcj-00048V-3h for emacs-orgmode@gnu.org; Fri, 07 Mar 2014 10:23:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLwci-0007lB-DG for emacs-orgmode@gnu.org; Fri, 07 Mar 2014 10:23:45 -0500 Received: from mail-ve0-x22c.google.com ([2607:f8b0:400c:c01::22c]:44917) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLwci-0007kw-8m for emacs-orgmode@gnu.org; Fri, 07 Mar 2014 10:23:44 -0500 Received: by mail-ve0-f172.google.com with SMTP id jx11so4391088veb.3 for ; Fri, 07 Mar 2014 07:23:43 -0800 (PST) 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: emacs-orgmode@gnu.org --001a1136776ad5ca7e04f405d633 Content-Type: text/plain; charset=ISO-8859-1 Hello I have a .org file where I am using sh code blocks to interact with a REST API via curl. My first call is to authenticate with the REST API which returns a token in the HTTP response. I would like to parse that HTTP response (ie. with elisp via a subsequent code block) and use the token in subsequent sh code blocks. Right now I am doing this via a manual step where I step where I run the first sh code block, set a :var PROPERTY, and then run the rest of the sh code blocks. I would like to automate it if possible. Thanks, -Rehan --001a1136776ad5ca7e04f405d633 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hello

I have a .org file where I am usi= ng sh code blocks to interact with a REST API via curl. My first call is to= authenticate with the REST API which returns a token in the HTTP response.= I would like to parse that HTTP response (ie. with elisp via a subsequent = code block) and use the token in subsequent sh code blocks.=A0

Right now I am doing this via a manual step where I ste= p where I run the first sh code block, set a :var PROPERTY, and then run th= e rest of the sh code blocks. I would like to automate it if possible.

Thanks,
-Rehan
--001a1136776ad5ca7e04f405d633--