emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Batch mode evaluation of source code?


From: Eric Schulte
Subject: Re: [O] Batch mode evaluation of source code?
Date: Fri, 17 Jun 2011 14:47:00 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Hi Herb,

The following org-mode file and minimal elisp file can be used to print
the results of evaluating a code block from a batch Emacs session (note
this is using Emacs24, so Org-mode/Babel do not need to be explicitly
loaded).

I used the following command line
: emacs --batch -l run-code.el 2> /dev/null

And the following two files.

Attachment: run-code.el
Description: application/emacs-lisp

Attachment: short-code.org
Description: Text Data

Cheers -- Eric

Herbert Sitz <address@hidden> writes:

> The Org manual gives an example of a batch mode --eval that runs code to 
> tangle
> code from Org files.  I assume there's also a way to simply run a source code
> block and get its output in the terminal but I can't see how to do it.
>
> To give a concrete example, the Org manual uses this Python source block as
> example illustrating the difference between :session and non-session results
> output.  How would I evaluate it from the command line and get the results
> output back in the terminal?:
>
> -------------------------
> #+begin_src python  :results output
> print "hello"
> 2
> print "bye"
> #+end_src
> ------------------------
>
> -- Herb
>
>
>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]