emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* ox-html problem exposed by ox-S5
@ 2013-07-29 21:36 Eric Schulte
  2013-07-29 22:04 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Schulte @ 2013-07-29 21:36 UTC (permalink / raw)
  To: Org Mode Mailing List

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

Hi,

While moving to the ox-s5 backend, which is very nice (thanks Rick), I
noticed a bug in ox-html.  The attached patch fixes this problem.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-check-html-link-home-exists-before-triming.patch --]
[-- Type: text/x-patch, Size: 1001 bytes --]

From 07d6c3d1943b2b6fe63ddc107c4c127c9b70b209 Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Mon, 29 Jul 2013 15:19:22 -0600
Subject: [PATCH] check html-link-home exists before triming

  Ensure that the :html-link-home property exists before passing it to
  `org-trim' which assumes it's argument is a string.
---
 lisp/ox-html.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 9fc53f1..2522f63 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2598,7 +2598,8 @@ images, set it to:
 DESC is the description part of the link, or the empty string.
 INFO is a plist holding contextual information.  See
 `org-export-data'."
-  (let* ((home (org-trim (plist-get info :html-link-home)))
+  (let* ((home (when (plist-get info :html-link-home)
+		 (org-trim (plist-get info :html-link-home))))
 	 (use-abs-url (plist-get info :html-link-use-abs-url))
 	 (link-org-files-as-html-maybe
 	  (function
-- 
1.8.3.4


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


Cheers,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte
PGP fingerprint: FA8D C2C3 E8A0 A749 34CD  9DCF 3C1B 8581 614C A05D

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: ox-html problem exposed by ox-S5
  2013-07-29 21:36 ox-html problem exposed by ox-S5 Eric Schulte
@ 2013-07-29 22:04 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2013-07-29 22:04 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org Mode Mailing List

Hi Eric,

Eric Schulte <schulte.eric@gmail.com> writes:

> While moving to the ox-s5 backend, which is very nice (thanks Rick), I
> noticed a bug in ox-html.  The attached patch fixes this problem.

applied, thanks!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-29 22:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-29 21:36 ox-html problem exposed by ox-S5 Eric Schulte
2013-07-29 22:04 ` Bastien

Code repositories for project(s) associated with this public 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).