From: Nick Dokos <nicholas.dokos@hp.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Cc: nicholas.dokos@hp.com
Subject: Re: Batch export to html
Date: Wed, 07 Dec 2011 11:49:57 -0500 [thread overview]
Message-ID: <28008.1323276597@alphaville.dokosmarshall.org> (raw)
In-Reply-To: Message from Vikas Rawal <vikaslists@agrarianresearch.org> of "Wed, 07 Dec 2011 16:46:21 +0530." <20111207111621.GA9897@panahar>
Vikas Rawal <vikaslists@agrarianresearch.org> wrote:
> I would like to export an org file to html using a batch command. This
> is the command I tried.
>
> emacs --batch --load=$HOME/lisp/org-7.01/lisp/org.el --eval "(setq
> org-export-headline-levels 1)" --visit=$HOME/file.org --funcall org-export-as-html-batch
>
> But I get an error which says:
>
> Symbol's function definition is void: org-in-block-p
>
> Could anyone explain what this could mean?
>
Exactly what it says: the function org-in-block-p is not defined anywhere.
Generally speaking, just loading org.el is *not* the way to initialize
org. I have a minimal.emacs which looks like this:
--8<---------------cut here---------------start------------->8---
;;; -*- mode: emacs-lisp -*-
;;; constant part
(add-to-list 'load-path (expand-file-name "~/src/emacs/org/org-mode/lisp"))
(add-to-list 'load-path (expand-file-name "~/src/emacs/org/org-mode/contrib/lisp"))
(add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode))
(require 'org-install)
(setq debug-on-error t)
(setq eval-expression-print-length nil)
(setq eval-expression-print-level nil)
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
--8<---------------cut here---------------end--------------->8---
(there is usually a "variable" part as well that is tailored for whatever
test I'm trying to do at the time). The important point is that to initialize
*my* installation of org, I have to (require 'org-install).
If you use org from git, you should have something similar. If not git, your
minimal .emacs should mimic pretty much your real .emacs (with extra
stuff stripped out).
With that, I can export with no problems:
,----
| $ emacs --batch --load=$HOME/minimal.emacs.org --eval "(setq org-export-headline-levels 1)" --visit=foo.org --funcall org-export-as-html-batch
| enabling speedbar support
| OVERVIEW
| Exporting...
| Exporting...
| Saving file /home/nick/src/org/html/foo.html...
| Wrote /home/nick/src/org/html/foo.html
| HTML export done, pushed to kill ring and clipboard
`----
Nick
next prev parent reply other threads:[~2011-12-07 16:50 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-29 16:13 org-mobile-push Vikas Rawal
2011-09-29 16:48 ` org-mobile-push Jambunathan K
[not found] ` <vikaslists@agrarianresearch.org>
2011-09-29 16:54 ` org-mobile-push Nick Dokos
2011-09-29 23:34 ` org-mobile-push Vikas Rawal
2011-10-01 6:40 ` org-mobile-push Nick Dokos
2011-10-02 3:09 ` org-mobile-push Vikas Rawal
2011-12-07 16:49 ` Nick Dokos [this message]
2012-11-06 21:23 ` error: Execution of bibtex2html Nick Dokos
2012-11-07 3:51 ` Vikas Rawal
2011-12-07 11:16 Batch export to html Vikas Rawal
2011-12-08 19:49 ` Achim Gratz
2012-11-05 20:54 error: Execution of bibtex2html Vikas Rawal
2012-11-06 16:43 ` Suvayu Ali
2012-11-06 21:09 ` Vikas Rawal
2012-11-06 21:24 ` Myles English
2012-11-07 2:57 ` Vikas Rawal
2012-11-07 3:24 ` Yagnesh Raghava Yakkala
2012-11-07 4:10 ` Nick Dokos
2012-11-07 9:02 ` Renaming the thread: orgmode-bibtex/html-export issues Vikas Rawal
2012-11-09 21:32 ` Vikas Rawal
2012-11-09 22:16 ` Vikas Rawal
2012-11-06 21:26 ` error: Execution of bibtex2html Vikas Rawal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=28008.1323276597@alphaville.dokosmarshall.org \
--to=nicholas.dokos@hp.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).