[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Export an org file from the command line in the background
From: |
Viktor Rosenfeld |
Subject: |
Re: [O] Export an org file from the command line in the background |
Date: |
Thu, 20 Oct 2011 00:28:50 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi Nick,
Nick Dokos wrote:
> The usual method is to run a separate emacs in batch mode: that will avoid
> any conflicts
> with the running instance. But batch implies -q, so you will have to provide
> a minimal .emacs
> file that sets up enough structure to enable you to do what you want:
>
> emacs --batch -l ~/minimal.emacs \
> --eval '(let ((org-confirm-babel-evaluate nil))
> (find-file "macports.org")
> (org-export-as-html 3))'
>
> should do it.
Thanks for your help. I got it running using a similar setup. One more
question, it doesn't matter if I put the code in the file that is loaded
via -l or in the --eval block, correct? I've included the code in the my
org file, so I can tangle it. I find it better to have all the Emacs
code in one location.
Here's what I came up with:
(add-to-list 'load-path (expand-file-name "~/unix/src/org-mode/lisp"))
(add-to-list 'load-path (expand-file-name "~/unix/src/org-mode/contrib/lisp"))
(require 'org)
(require 'ob-sh)
(require 'ansi-color)
(let ((ansi-color-for-comint-mode nil)
(org-confirm-babel-evaluate nil)
(org-use-sub-superscripts nil))
(find-file "~/org/projects/macports/macports.org")
(org-with-point-at
(org-id-find "83583083-47B7-44DF-8474-1C6D03491C97" 'marker)
(org-babel-execute-subtree))
(org-export-as-html t)
(kill-buffer))
Thanks again,
Viktor
- [O] Export an org file from the command line in the background, Viktor Rosenfeld, 2011/10/19
- Re: [O] Export an org file from the command line in the background, Jambunathan K, 2011/10/19
- [O] Code block evaluation export bug ? (was: Re: Export an org file from the command line in the background), Nick Dokos, 2011/10/19
- Re: [O] Code block evaluation export bug ?, Thomas S. Dye, 2011/10/20
- Re: [O] Code block evaluation export bug ?, Nick Dokos, 2011/10/20
- Re: [O] Code block evaluation export bug ?, Nick Dokos, 2011/10/21
- Re: [O] Code block evaluation export bug ?, Nick Dokos, 2011/10/22