emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rehan Iftikhar <rehan.iftikhar@gmail.com>
To: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <CAJsxe3OU-Vws+02qaC0GagByiiTMGw9SwYdh00cnNYd+LO6Y2Q@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 543 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 654 bytes --]

             reply	other threads:[~2014-03-07 15:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-07 15:23 Rehan Iftikhar [this message]
2014-03-07 15:35 ` [babel] Parse another code block's output then use captured data in another code block Eric Schulte
2014-03-07 15:38 ` Andreas Leha

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=CAJsxe3OU-Vws+02qaC0GagByiiTMGw9SwYdh00cnNYd+LO6Y2Q@mail.gmail.com \
    --to=rehan.iftikhar@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).