emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Herbert Sitz <hsitz@nwlink.com>
To: emacs-orgmode@gnu.org
Subject: Re: Batch mode evaluation of source code?
Date: Sat, 18 Jun 2011 00:17:47 +0000 (UTC)	[thread overview]
Message-ID: <loom.20110618T020824-361@post.gmane.org> (raw)
In-Reply-To: 871uysrrdp.fsf@gmail.com

Eric Schulte <schulte.eric <at> gmail.com> writes:
> 
> By connecting to a persistent Emacs instance much of the .el script I
> attached could be removed assuming Babel has already been configured in
> the running Emacs server.
> 
> Hope this helps -- Eric
> 

Eric, Nick:

Thanks, yes it does.  Using also Nick's tip about using --eval (batch doesn't
seem to work when calling a client process) I've got things working at least
part of the way.

I can do the following command in the terminal:

>  "c:\program files (x86)\emacs\emacs\bin\emacsclientw.exe" --eval ^"(progn (let
((org-confirm-babel-evaluate nil)) (find-file \^"short-code.org\^")
(org-babel-next-src-block) (print (org-babel-execute-src-block))))

This gets processed properly by the running client, but print command output
goes into the *message* buffer rather than to the terminal used to enter the
command.

Any tips on how to redirect the output to my terminal?  If not, saving to a file
is a decent alternative (though I don't know how to do that either, lol).

-- Herb

  reply	other threads:[~2011-06-18  0:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-17 21:14 Batch mode evaluation of source code? Herbert Sitz
2011-06-17 21:47 ` Eric Schulte
2011-06-17 22:45   ` Herbert Sitz
2011-06-17 22:55     ` Herbert Sitz
2011-06-17 23:02       ` Nick Dokos
2011-06-17 23:10         ` Herbert Sitz
2011-06-17 23:05     ` Eric Schulte
2011-06-18  0:17       ` Herbert Sitz [this message]
2011-06-18  7:32     ` Achim Gratz

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=loom.20110618T020824-361@post.gmane.org \
    --to=hsitz@nwlink.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).