From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Phillip Lord <phillip.lord@newcastle.ac.uk>
Cc: emacs-orgmode@gnu.org
Subject: Re: Struggling with new exporter
Date: Mon, 22 Sep 2014 22:15:26 +0200 [thread overview]
Message-ID: <87y4tbfm3l.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87a95r4epd.fsf@newcastle.ac.uk> (Phillip Lord's message of "Mon, 22 Sep 2014 20:50:38 +0100")
Hello,
phillip.lord@newcastle.ac.uk (Phillip Lord) writes:
> I'm rather struggling with the new exporter. I fear I have used a
> combination of old and new configuration which cannot be helping.
> I am trying to get publishing working mostly in batch, so that it will
> work as part of my continuous integration framework. But having it work
> interactively would be nice also.
>
> I have installed the org-mode daily from the Org ELPA. I have a file
> called book.org, which also includes several other files.
>
> I want to publish to HTML and PDF. It would be nice to publish to
> some kind of chunked HTML also, as the file will get quite long, but for
> the moment I can live with out this.
>
>
> The headers look like this:
>
> #+LATEX_HEADER: \usepackage{tawny}
> #+LATEX_HEADER: \lstnewenvironment{tawny}{\lstset{style=tawnystyle}}{}
>
> #+BIND: org-publishing-directory "./exports"
> #+BIND: org-latex-custom-lang-environments ((clojure "tawny"))
> #+BIND: org-latex-listings t
>
> Tawny is my own package, and is present in the same location as the org
> file. It provides the syntax highlighting support latex.
>
> Now, by original batch build commands looked like this...
>
> (defun build/pdf ()
> (with-current-buffer
> (find-file-noselect build-source-file)
> (org-export-as-pdf
> org-export-headline-levels)))
>
> (defun build/html ()
> (init-faces)
> (setq htmlize-use-rgb-map 'force)
> (with-current-buffer
> (find-file-noselect build-source-file))
> (org-export-as-html-batch org-export-headline-levels))
>
> but these are using the old org-export functions.
>
> My current version looks like this...
>
> (defun build/html ()
> (init-faces)
> (setq htmlize-use-rgb-map 'force)
> (with-current-buffer
> (find-file-noselect build-source-file))
> (org-html-publish-to-html
> ;; publishing plist
> nil
> ;; output file name
> "book.html"
> ;; directory
> "exports"))
>
> Which is crashing with:
[...]
`org-html-publish-to-html' is not meant to be called directly, but
rather used in a project definition as a :publishing-function value.
Speaking of which, why don't you simply create a proper project-alist
and call `org-publish' on it (interactively or not)?
If you simply want to export a single file, then the correct functions
are `org-latex-export-to-pdf' and `org-html-export-to-html'. Note that
the first (optional) argument isn't the maximum headline level anymore,
so don't call any of them with `org-export-headline-levels'.
HTH,
--
Nicolas Goaziou
next prev parent reply other threads:[~2014-09-22 20:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-22 19:50 Struggling with new exporter Phillip Lord
2014-09-22 20:15 ` Nicolas Goaziou [this message]
2014-09-23 8:55 ` Phillip Lord
2014-09-23 21:35 ` Nicolas Goaziou
2014-09-24 11:44 ` Phillip Lord
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y4tbfm3l.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=phillip.lord@newcastle.ac.uk \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.