From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Publishing using the new exporter Date: Tue, 25 Sep 2012 12:58:12 +0200 Message-ID: <87ehlq9xob.fsf@gmail.com> References: <50602E92.3080705@mpip-mainz.mpg.de> <87y5jzafab.fsf@gmail.com> <50609817.705@mpip-mainz.mpg.de> <50615A38.2020506@mpip-mainz.mpg.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGSuT-0005iV-HM for emacs-orgmode@gnu.org; Tue, 25 Sep 2012 07:02:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGSuO-0007JS-Lp for emacs-orgmode@gnu.org; Tue, 25 Sep 2012 07:02:37 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:45429) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGSuO-0007IR-Fo for emacs-orgmode@gnu.org; Tue, 25 Sep 2012 07:02:32 -0400 Received: by wibhj13 with SMTP id hj13so312550wib.12 for ; Tue, 25 Sep 2012 04:02:31 -0700 (PDT) In-Reply-To: <50615A38.2020506@mpip-mainz.mpg.de> (Robert Klein's message of "Tue, 25 Sep 2012 09:16:08 +0200") 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: Robert Klein Cc: emacs-orgmode@gnu.org Hello, Robert Klein writes: > If i set :html-preable to either s2-preamble or 's2-preamble nothing > gets inserted. > > I studied the code in org-e-html (excerpt below), but i don't see what I > did wrong. > > #+begin_src elisp :file contrib/lisp/org-e-html.el :firstline 1329 > (defun org-e-html-preamble (info) > (when (plist-get info :html-preamble) > (let* ((title (org-export-data (plist-get info :title) info)) > (date (org-e-html-format-date info)) > (author (org-export-data (plist-get info :author) info)) > (email (plist-get info :email)) > (html-pre-real-contents > (cond > ((functionp (plist-get info :html-preamble)) > (with-temp-buffer > (funcall (plist-get info :html-preamble)) > (buffer-string))) > #+end_src That's because the code expects the function to write to a buffer instead of simply returning a string, which is wrong IMO. The condition should simply be: ((functionp (plist-get info :html-preamble)) (funcall (plist-get info :html-preamble))) I will change this in a few hours unless someone beats me to it. Regards, -- Nicolas Goaziou