emacs-orgmode
[Top][All Lists]
Advanced

[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: Nick Dokos
Subject: Re: [O] Export an org file from the command line in the background
Date: Wed, 19 Oct 2011 18:37:10 -0400

Viktor Rosenfeld <address@hidden> wrote:

> ... 
> 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.
>

Correct. Which is preferable is very much a matter of usage patterns and
taste.

> 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))

You don't need the kill-buffer if emacs is just going to exit. But it doesn't 
hurt.

Nick




reply via email to

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