From mboxrd@z Thu Jan 1 00:00:00 1970 From: Austin Walker Subject: [PATCH] Fix TODO export in html TOC Date: Wed, 17 Feb 2016 23:22:00 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11443e4afe9d77052c03b6d2 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWG6r-0000hY-2i for emacs-orgmode@gnu.org; Wed, 17 Feb 2016 23:22:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWG6p-00015J-Cx for emacs-orgmode@gnu.org; Wed, 17 Feb 2016 23:22:32 -0500 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]:34640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWG6p-00015D-35 for emacs-orgmode@gnu.org; Wed, 17 Feb 2016 23:22:31 -0500 Received: by mail-wm0-x22c.google.com with SMTP id b205so7933876wmb.1 for ; Wed, 17 Feb 2016 20:22:30 -0800 (PST) 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 --001a11443e4afe9d77052c03b6d2 Content-Type: text/plain; charset=UTF-8 Hello all, I'd like to submit a fix for an issue seen by reddit user simonced. https://www.reddit.com/r/emacs/comments/46717x/orgmode_todo_html_export_in_toc/ When exporting a TODO headline to html, the TOC will show the class to be "todo nilTODO". The fix is to replace nil with an empty string. I'm new to the org-mode mailing list, so please let me know if I made a mistake. Thanks! >From e456d1722f983baa11a38e944be279f4d21f588b Mon Sep 17 00:00:00 2001 From: Austin Walker Date: Wed, 17 Feb 2016 22:43:00 -0500 Subject: [PATCH] ox-html.el: Fix TOC export of TODO headlines * lisp/ox-html.el (org-html--todo): Don't show nil in format string for TODO class Use empty string if :html-todo-kwd-class-prefix is not present. TINYCHANGE --- lisp/ox-html.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 697e5aa..2d7acec 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -1989,7 +1989,7 @@ INFO is a plist used as a communication channel." (when todo (format "%s" (if (member todo org-done-keywords) "done" "todo") - (plist-get info :html-todo-kwd-class-prefix) + (or (plist-get info :html-todo-kwd-class-prefix) "") (org-html-fix-class-name todo) todo))) -- 2.7.1 - Austin Walker --001a11443e4afe9d77052c03b6d2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello all,

I'd like to submit a= fix for an issue seen by reddit user simonced.
https://www.reddit.com/r/emacs/comments/46717x/orgmode_todo_htm= l_export_in_toc/

When exporting a TODO headline to html, the TOC= will show the class to be "todo nilTODO". The fix i= s to replace nil with an empty string. I'm new to the org-mode mailing = list, so please let me know if I made a mistake. Thanks!

From e456d1= 722f983baa11a38e944be279f4d21f588b Mon Sep 17 00:00:00 2001
From: Austin= Walker <awalk89@gmail.com><= br>Date: Wed, 17 Feb 2016 22:43:00 -0500
Subject: [PATCH] ox-html.el: Fi= x TOC export of TODO headlines

* lisp/ox-html.el (org-html--todo): D= on't show nil in format string for
=C2=A0 TODO class

Use empty string if :html-todo-kwd-class-prefix is not present.

TINYCHANGE
---
=C2=A0lisp/ox-html.el | 2 +-
=C2=A01 file= changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox-html.el= b/lisp/ox-html.el
index 697e5aa..2d7acec 100644
--- a/lisp/ox-html.e= l
+++ b/lisp/ox-html.el
@@ -1989,7 +1989,7 @@ INFO is a plist used as= a communication channel."
=C2=A0=C2=A0 (when todo
=C2=A0=C2=A0= =C2=A0=C2=A0 (format "<span class=3D\"%s %s%s\">%s<= /span>"
=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 (if (member = todo org-done-keywords) "done" "todo")
-=C2=A0=C2=A0= =C2=A0 =C2=A0=C2=A0=C2=A0 (plist-get info :html-todo-kwd-class-prefix)
+= =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 (or (plist-get info :html-todo-kwd-cl= ass-prefix) "")
=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 (o= rg-html-fix-class-name todo)
=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0= todo)))
=C2=A0
--
2.7.1

- Austin Walker
--001a11443e4afe9d77052c03b6d2--