From mboxrd@z Thu Jan 1 00:00:00 1970 From: Herbert Sitz Subject: Re: Batch mode evaluation of source code? Date: Sat, 18 Jun 2011 00:17:47 +0000 (UTC) Message-ID: References: <8762o4ruzv.fsf@gmail.com> <871uysrrdp.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:57466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXjEg-0005ay-6o for emacs-orgmode@gnu.org; Fri, 17 Jun 2011 20:18:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QXjEf-0006H0-8D for emacs-orgmode@gnu.org; Fri, 17 Jun 2011 20:18:02 -0400 Received: from lo.gmane.org ([80.91.229.12]:42410) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXjEf-0006Gt-31 for emacs-orgmode@gnu.org; Fri, 17 Jun 2011 20:18:01 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QXjEd-0003ia-BJ for emacs-orgmode@gnu.org; Sat, 18 Jun 2011 02:17:59 +0200 Received: from c-24-22-131-140.hsd1.wa.comcast.net ([24.22.131.140]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 18 Jun 2011 02:17:59 +0200 Received: from hsitz by c-24-22-131-140.hsd1.wa.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 18 Jun 2011 02:17:59 +0200 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 Eric Schulte 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