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