From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Rework org-export-html-preamble/postamble (again) Date: Thu, 10 Mar 2011 10:27:47 +0100 Message-ID: <874o7bgwa4.fsf@gnu.org> References: <87pqq08e0e.fsf@gnu.org> <87d3m0dozi.fsf@riotblast.dunsmor.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=33517 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxcAC-0001p2-MO for emacs-orgmode@gnu.org; Thu, 10 Mar 2011 04:28:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxcAB-0007UQ-6D for emacs-orgmode@gnu.org; Thu, 10 Mar 2011 04:28:08 -0500 Received: from mail-wy0-f169.google.com ([74.125.82.169]:35549) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxcAA-0007UA-Ow for emacs-orgmode@gnu.org; Thu, 10 Mar 2011 04:28:07 -0500 Received: by wyf19 with SMTP id 19so1493503wyf.0 for ; Thu, 10 Mar 2011 01:28:06 -0800 (PST) In-Reply-To: <87d3m0dozi.fsf@riotblast.dunsmor.com> (Jason Dunsmore's message of "Wed, 09 Mar 2011 14:21:21 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Jason Dunsmore Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hi Jason, Jason Dunsmore writes: > Bastien writes: > >> Hopefully this patch will solve a few issues that have just been raised >> about the new behavior of org-export-html-preamble/postamble. > > With this patch, I get the following error when exporting to HTML: > > list: Symbol's value as variable is void: creator-info Applying the attached patch above the previous one should do. Let me know, thanks! --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-org-html.el-Bugfix-define-email-and-creator-info-bef.patch >From 368ff7ba090a663e77cb90af2d89206af9201644 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Thu, 10 Mar 2011 10:26:37 +0100 Subject: [PATCH 2/2] * org-html.el: Bugfix: define email and creator-info before using them. * org-html.el (org-export-as-html): Bugfix: define email and creator-info before using them. Thanks to Jason Dunsmore for catching this. --- lisp/org-html.el | 37 ++++++++++++++++++------------------- 1 files changed, 18 insertions(+), 19 deletions(-) diff --git a/lisp/org-html.el b/lisp/org-html.el index d5ea1a3..1661085 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -1704,7 +1704,15 @@ lang=\"%s\" xml:lang=\"%s\"> ;; Export html postamble (unless body-only - (let ((html-post (plist-get opt-plist :html-postamble))) + (let ((html-post (plist-get opt-plist :html-postamble)) + ((email + (mapconcat (lambda(e) + (format "%s" e e)) + (split-string email ",+ *") + ", ")) + (creator-info + (concat "Org version " org-version " with Emacs version " + (number-to-string emacs-major-version))))) (when (plist-get opt-plist :html-postamble) (cond ((stringp html-post) (insert "
\n") @@ -1717,25 +1725,16 @@ lang=\"%s\" xml:lang=\"%s\"> (funcall html-post opt-plist)) ((eq html-post 'auto) ;; fall back on default postamble - (let - ((email - (mapconcat (lambda(e) - (format "%s" e e)) - (split-string email ",+ *") - ", ")) - (creator-info - (concat "Org version " org-version " with Emacs version " - (number-to-string emacs-major-version)))) - (insert "
\n") - (when (and (plist-get opt-plist :author-info) author) + (insert "
\n") + (when (and (plist-get opt-plist :author-info) author) (insert "

" (nth 1 lang-words) ": " author "

\n")) - (when (and (plist-get opt-plist :email-info) email) - (insert "

<" email ">

\n")) - (when (plist-get opt-plist :creator-info) - (insert "

" - (concat "Org version " org-version " with Emacs version " - (number-to-string emacs-major-version) "

\n"))) - (insert html-validation-link "\n
"))) + (when (and (plist-get opt-plist :email-info) email) + (insert "

<" email ">

\n")) + (when (plist-get opt-plist :creator-info) + (insert "

" + (concat "Org version " org-version " with Emacs version " + (number-to-string emacs-major-version) "

\n"))) + (insert html-validation-link "\n
")) (t (insert "
\n") (insert (format-spec -- 1.7.4.1 --=-=-= Content-Type: text/plain -- Bastien --=-=-=--