From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bill Jackson Subject: Bug inserting preamble from function in org-export-as-html Date: Mon, 09 Jan 2012 18:09:31 -0800 Message-ID: <4F0B9DDB.4080705@jacksonhost.com> 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 ([140.186.70.92]:49141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkR9Z-0002bM-CI for emacs-orgmode@gnu.org; Mon, 09 Jan 2012 21:09:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RkR9Y-0002KF-CN for emacs-orgmode@gnu.org; Mon, 09 Jan 2012 21:09:33 -0500 Received: from oproxy6-pub.bluehost.com ([67.222.54.6]:60238) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RkR9X-0002KA-Rm for emacs-orgmode@gnu.org; Mon, 09 Jan 2012 21:09:32 -0500 Received: from ip68-4-162-105.oc.oc.cox.net ([68.4.162.105] helo=[192.168.1.100]) by box291.bluehost.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RkR9V-0006bN-3e for emacs-orgmode@gnu.org; Mon, 09 Jan 2012 19:09:29 -0700 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: emacs-orgmode@gnu.org I believe that a bug was introduced into org-export-as-html sometime after version 7.7, and is still present in 7.8.03. In the file org-html.el, the section of org-export-as-html that inserts the HTML preamble is broken in the case were a function is passed for the preamble. The following change works for me, but I have not tested it for other use cases: diff -u org-html.el.ORIG org-html.el --- org-html.el.ORIG 2012-01-03 00:32:07.000000000 -0800 +++ org-html.el 2012-01-09 13:46:15.458708317 -0800 @@ -1351,7 +1351,7 @@ ;; insert html preamble (when (plist-get opt-plist :html-preamble) (let ((html-pre (plist-get opt-plist :html-preamble)) - html-pre-real-contents) + (html-pre-real-contents "")) (cond ((stringp html-pre) (setq html-pre-real-contents (format-spec html-pre `((?t . ,title) (?a . ,author) Regards, Bill