From: "briangpowell ." <briangpowellms@gmail.com>
To: Shakthi Kannan <shakthimaan@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Scripting with org-mode
Date: Mon, 30 Nov 2015 13:48:30 -0500 [thread overview]
Message-ID: <CAFm0skFqoTn+0tbrcLanHXymP1eBUw-tM7O_R3OdtVPsbR7KfA@mail.gmail.com> (raw)
In-Reply-To: <CABG-yt2dC9Nc+p0FRFO8gJWe6+wGZvFjBNacX6Q_gQjAa3=s4Q@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 962 bytes --]
* Assuming that entire file is made up of shell commands (like the ones in
the example you gave) since, in such a case as your example the "#" in the
first column would ignore the rest of the lines as comments:
M<
Mx set-mark
M>
Mx shell-command-on-region
On Mon, Nov 30, 2015 at 11:43 AM, Shakthi Kannan <shakthimaan@gmail.com>
wrote:
> 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
>
>
[-- Attachment #2: Type: text/html, Size: 1600 bytes --]
next prev parent reply other threads:[~2015-11-30 18:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-30 16:43 Scripting with org-mode Shakthi Kannan
2015-11-30 18:48 ` briangpowell . [this message]
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=CAFm0skFqoTn+0tbrcLanHXymP1eBUw-tM7O_R3OdtVPsbR7KfA@mail.gmail.com \
--to=briangpowellms@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=shakthimaan@gmail.com \
/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).