Hi Jason,

Jason Dunsmore <emacs-orgm...@dunsmor.com> writes:

> Bastien <b...@altern.org> 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!

>From 368ff7ba090a663e77cb90af2d89206af9201644 Mon Sep 17 00:00:00 2001
From: Bastien Guerry <b...@altern.org>
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 "<a href=\"mailto:%s\">%s</a>" 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 "<div id=\"postamble\">\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 "<a href=\"mailto:%s\">%s</a>" e e))
-				    (split-string email ",+ *")
-				    ", "))
-			(creator-info
-			 (concat "Org version " org-version " with Emacs version "
-				 (number-to-string emacs-major-version))))
-		     (insert "<div id=\"postamble\">\n")
-		     (when (and (plist-get opt-plist :author-info) author)
+		   (insert "<div id=\"postamble\">\n")
+		   (when (and (plist-get opt-plist :author-info) author)
 		       (insert "<p class=\"author\">" (nth 1 lang-words) ": " author "</p>\n"))
-		     (when (and (plist-get opt-plist :email-info) email)
-		       (insert "<p class=\"mailto:" email "\">&lt;" email "&gt;</p>\n"))
-		     (when (plist-get opt-plist :creator-info)
-		       (insert "<p class=\"creator\">"
-			       (concat "Org version " org-version " with Emacs version "
-				       (number-to-string emacs-major-version) "</p>\n")))
-		     (insert html-validation-link "\n</div>")))
+		   (when (and (plist-get opt-plist :email-info) email)
+		     (insert "<p class=\"mailto:" email "\">&lt;" email "&gt;</p>\n"))
+		   (when (plist-get opt-plist :creator-info)
+		     (insert "<p class=\"creator\">"
+			     (concat "Org version " org-version " with Emacs version "
+				     (number-to-string emacs-major-version) "</p>\n")))
+		   (insert html-validation-link "\n</div>"))
 		  (t 
 		   (insert "<div id=\"postamble\">\n")
 		   (insert (format-spec
-- 
1.7.4.1

-- 
 Bastien

Reply via email to