From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Zane D. Purvis" Subject: [PATCH] ox-html.el: Add exporting of priority Date: Fri, 9 Jan 2015 10:43:22 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9biy-0004ME-6o for emacs-orgmode@gnu.org; Fri, 09 Jan 2015 10:43:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y9bix-0002fm-7s for emacs-orgmode@gnu.org; Fri, 09 Jan 2015 10:43:44 -0500 Received: from mail-qc0-x22a.google.com ([2607:f8b0:400d:c01::22a]:37703) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9bix-0002fd-31 for emacs-orgmode@gnu.org; Fri, 09 Jan 2015 10:43:43 -0500 Received: by mail-qc0-f170.google.com with SMTP id x3so9475447qcv.1 for ; Fri, 09 Jan 2015 07:43:42 -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 * list/ox-html.el (org-html--priority): New function. (org-html-format-headline-default-function): Call `org-html--priority'. (org-html-style-default): Add `.priority'. HTML export previously did not support exporting of priority simply by setting `org-export-with-priority' to `t'. TINYCHANGE --- lisp/ox-html.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 3c3b444..a1c33ac 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -278,6 +278,7 @@ defconst org-html-style-default .done { color: green; } .tag { background-color: #eee; font-family: monospace; padding: 2px; font-size: 80%; font-weight: normal; } + .priority { font-family: monospace; color: orange; } .timestamp { color: #bebebe; } .timestamp-kwd { color: #5f9ea0; } .right { margin-left: auto; margin-right: 0px; text-align: right; } @@ -1885,6 +1886,14 @@ defun org-html--todo (todo info) (org-html-fix-class-name todo) todo))) +;;;; Priority + +(defun org-html--priority (priority info) + "Format a priority into HTML. +PRIORITY is the character code of the priority or nil. +INFO is a plist containing export options." + (and priority (format "[%c]" priority))) + ;;;; Tags (defun org-html--tags (tags info) @@ -2396,8 +2405,9 @@ defun org-html-format-headline-default-function "Default format function for a headline. See `org-html-format-headline-function' for details." (let ((todo (org-html--todo todo info)) + (priority (org-html--priority priority info)) (tags (org-html--tags tags info))) - (concat todo (and todo " ") text (and tags "   ") tags))) + (concat todo (and todo " ") priority (and priority " ") text (and tags "   ") tags))) (defun org-html--container (headline info) (or (org-element-property :HTML_CONTAINER headline) -- 1.9.2.msysgit.0