From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Barton Subject: Re: Publishing to html With the New Exporter Date: Mon, 18 Feb 2013 14:58:23 +0000 Message-ID: <5122418F.2000306@wilkesley.net> References: <512223BE.80500@wilkesley.net> <87bobhwwvy.fsf@gmail.com> Reply-To: ian@manor-farm.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:45252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7SAp-00013K-9K for emacs-orgmode@gnu.org; Mon, 18 Feb 2013 09:58:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7SAk-0006qp-97 for emacs-orgmode@gnu.org; Mon, 18 Feb 2013 09:58:31 -0500 Received: from mail2.wilkesley.net ([109.74.196.44]:53102 helo=li40-130.members.linode.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7SAk-0006qb-0M for emacs-orgmode@gnu.org; Mon, 18 Feb 2013 09:58:26 -0500 In-Reply-To: <87bobhwwvy.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: ian@manor-farm.org, emacs-orgmode@gnu.org On 18/02/13 13:54, Nicolas Goaziou wrote: > Hello, > > Ian Barton writes: > >> I am trying to change my publishing setup over to use the new exporter. >> With the recent merge and change of names from -e-backend to -ox-backend >> I am a bit confused as to how I should set up my publishing alist. >> >> I have tried: >> >> #+begin_example >> >> (require 'ox-html) >> (require 'ox-publish) > > FWIW, (require 'ox-html) also requires 'ox-publish. > >> ;;(require 'org-publish) >> (setq org-publish-project-alist >> '( >> >> >> >> >> ("org-static-ian" >> :base-directory "~/Dropbox/web_sites/ianbarton/org/_posts" >> :base-extension >> "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|php" >> :publishing-directory >> "~/Dropbox/web_sites/ianbarton/pelican/blog/content" >> :recursive t >> :publishing-function org-ox-publish-attachment) > > This should be `org-html-publish-to-html'. > >> >> >> ("org-ianbarton" >> :base-directory "~/Dropbox/web_sites/ianbarton/org/_posts" >> :base-extension "org" >> :publishing-directory >> "~/Dropbox/web_sites/ianbarton/pelican/blog/content" >> :recursive t >> :publishing-function org-ox-html-publish-to-html >> :headline-levels 4 ; Just the default for this >> project. >> :auto-preamble t >> :auto-index f >> :html-extension "yml" >> :auto-preamble t >> :body-only t >> ) >> >> ("ianbarton" :components ("org-ianbarton" "org-static-ian")) >> >> >> >> >> )) >> >> #+end_example > Thanks, I had already tried `org-html-publish-to-html, but got the following backtrace: Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil) org-export-to-file(html "/home/ian/Dropbox/web_sites/ianbarton/pelican/blog/content/2012-12-31-test.html" nil nil t (:base-directory "~/Dropbox/web_sites/ianbarton/org/_posts" :base-extension "org" :publishing-directory "~/Dropbox/web_sites/ianbarton/pelican/blog/content" :recursive t :publishing-function org-html-publish-to-html :headline-levels 4 :auto-preamble t :auto-index f :html-extension "yml" :auto-preamble t :body-only t :filter-parse-tree (org-publish-collect-index))) org-publish-org-to(html "/home/ian/Dropbox/web_sites/ianbarton/org/_posts/2012-12-31-test.org" ".html" (:base-directory "~/Dropbox/web_sites/ianbarton/org/_posts" :base-extension "org" :publishing-directory "~/Dropbox/web_sites/ianbarton/pelican/blog/content" :recursive t :publishing-function org-html-publish-to-html :headline-levels 4 :auto-preamble t :auto-index f :html-extension "yml" :auto-preamble t :body-only t) "/home/ian/Dropbox/web_sites/ianbarton/pelican/blog/content/") org-html-publish-to-html((:base-directory "~/Dropbox/web_sites/ianbarton/org/_posts" :base-extension "org" :publishing-directory "~/Dropbox/web_sites/ianbarton/pelican/blog/content" :recursive t :publishing-function org-html-publish-to-html :headline-levels 4 :auto-preamble t :auto-index f :html-extension "yml" :auto-preamble t :body-only t) "/home/ian/Dropbox/web_sites/ianbarton/org/_posts/2012-12-31-test.org" "/home/ian/Dropbox/web_sites/ianbarton/pelican/blog/content/") org-publish-file("/home/ian/Dropbox/web_sites/ianbarton/org/_posts/2012-12-31-test.org" ("org-ianbarton" :base-directory "~/Dropbox/web_sites/ianbarton/org/_posts" :base-extension "org" :publishing-directory "~/Dropbox/web_sites/ianbarton/pelican/blog/content" :recursive t :publishing-function org-html-publish-to-html :headline-levels 4 :auto-preamble t :auto-index f :html-extension "yml" :auto-preamble t :body-only t) t) #[(project) "\306@!\210A\307 \310\"\307 \311\"\307 \312\"\206 A bit more investigating showed that the file causing the problem was a blank .org file with no content at all. Removing this fixed the problem and I can now export! I don't know if not being able to handle files with no content should be considered a bug or not. Ian.