emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@altern.org>
To: Jason Dunsmore <emacs-orgmode@dunsmor.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Rework org-export-html-preamble/postamble (again)
Date: Thu, 10 Mar 2011 10:27:47 +0100	[thread overview]
Message-ID: <874o7bgwa4.fsf@gnu.org> (raw)
In-Reply-To: <87d3m0dozi.fsf@riotblast.dunsmor.com> (Jason Dunsmore's message of "Wed, 09 Mar 2011 14:21:21 -0600")

[-- Attachment #1: Type: text/plain, Size: 456 bytes --]

Hi Jason,

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

> Bastien <bzg@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!


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-org-html.el-Bugfix-define-email-and-creator-info-bef.patch --]
[-- Type: text/x-patch, Size: 2891 bytes --]

From 368ff7ba090a663e77cb90af2d89206af9201644 Mon Sep 17 00:00:00 2001
From: Bastien Guerry <bzg@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


[-- Attachment #3: Type: text/plain, Size: 14 bytes --]


-- 
 Bastien

  reply	other threads:[~2011-03-10  9:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-09 16:17 Bastien
2011-03-09 20:21 ` Jason Dunsmore
2011-03-10  9:27   ` Bastien [this message]
2011-03-10 14:46     ` Jason Dunsmore
2011-03-10 18:29       ` Bastien
2011-03-15 15:55         ` Jason Dunsmore
2011-03-15 18:11           ` Bastien
2011-03-15 20:26             ` Jason Dunsmore
2011-03-17  7:08               ` Bastien
2011-03-15 15:25       ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874o7bgwa4.fsf@gnu.org \
    --to=bzg@altern.org \
    --cc=emacs-orgmode@dunsmor.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: Rework org-export-html-preamble/postamble (again)' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).