emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Shakthi Kannan <shakthimaan@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Scripting with org-mode
Date: Mon, 30 Nov 2015 22:13:47 +0530	[thread overview]
Message-ID: <CABG-yt2dC9Nc+p0FRFO8gJWe6+wGZvFjBNacX6Q_gQjAa3=s4Q@mail.gmail.com> (raw)

Hi,

Is there a way to execute all the org-mode code blocks in a file, and
send the output to stdout?

For example, I have the following org file:

=== BEGIN ===

* Greeting

#+BEGIN_SRC sh :results output
  echo "Hello $USER! Today is `date`"
#+END_SRC

* Current directory

#+BEGIN_SRC sh :results output
  pwd
#+END_SRC

=== END ===

I could go to each code block, and type C-c C-c to produce an output.
But, I just want to be able to execute the entire file, and produce
one single output.

Is this possible?

SK

-- 
Shakthi Kannan
http://www.shakthimaan.com

             reply	other threads:[~2015-11-30 16:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-30 16:43 Shakthi Kannan [this message]
2015-11-30 18:48 ` Scripting with org-mode briangpowell .
2015-11-30 19:15 ` John Kitchin
2015-11-30 20:22   ` Nick Dokos
2015-11-30 20:36     ` John Kitchin
2015-12-01  1:03     ` Shakthi Kannan

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='CABG-yt2dC9Nc+p0FRFO8gJWe6+wGZvFjBNacX6Q_gQjAa3=s4Q@mail.gmail.com' \
    --to=shakthimaan@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).