Re: [O] [PATCH] ox-html.el: Add exporting of priority

2015-01-10 Thread Nicolas Goaziou
Hello,

Zane D. Purvis zane.pur...@gmail.com writes:

 * 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'.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou



[O] [PATCH] ox-html.el: Add exporting of priority

2015-01-09 Thread Zane D. Purvis
* 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 span class=\priority\[%c]/span 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 #xa0;#xa0;#xa0;) tags)))
+(concat todo (and todo  ) priority (and priority  ) text (and
tags #xa0;#xa0;#xa0;) tags)))

 (defun org-html--container (headline info)
   (or (org-element-property :HTML_CONTAINER headline)
-- 
1.9.2.msysgit.0



Re: [O] [PATCH] ox-html.el: add exporting of priority

2015-01-09 Thread Nicolas Goaziou
Hello,

Zane D. Purvis zane.pur...@gmail.com writes:

Thanks for the patch.

The summary line should be capitalized, i.e.,

  ox-html: Add exporting of priority

 * list/ox-html.el (org-html--priority): new function

Capitalize, too.

 (org-html-format-headline-default-function): call `org-html--priority'

Ditto.

 (org-html-style-default): add `.priority'

Ditto.

 +(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.
 +  (when priority
 +(format span class=\priority\[%s]/span
 +(byte-to-string priority

Shorter:

  (and priority (format span class=\priority\[%c]/span priority))

Could you fix these issues before I apply your patch?


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] ox-html.el: add exporting of priority

2015-01-09 Thread Zane D. Purvis
Sure thing. Expect a new patch momentarily. Thanks.

On Fri, Jan 9, 2015 at 3:20 AM, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 Hello,

 Zane D. Purvis zane.pur...@gmail.com writes:

 Thanks for the patch.

 The summary line should be capitalized, i.e.,

   ox-html: Add exporting of priority

 * list/ox-html.el (org-html--priority): new function

 Capitalize, too.

 (org-html-format-headline-default-function): call `org-html--priority'

 Ditto.

 (org-html-style-default): add `.priority'

 Ditto.

 +(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.
 +  (when priority
 +(format span class=\priority\[%s]/span
 +(byte-to-string priority

 Shorter:

   (and priority (format span class=\priority\[%c]/span priority))

 Could you fix these issues before I apply your patch?


 Regards,

 --
 Nicolas Goaziou



[O] [PATCH] ox-html.el: add exporting of priority

2015-01-08 Thread Zane D. Purvis
* 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 | 14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 3c3b444..1d1aa57 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -278,6 +278,7 @@ for the JavaScript code in this tag.
   .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,16 @@ INFO is a plist used as a communication channel.
 (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.
+  (when priority
+(format span class=\priority\[%s]/span
+(byte-to-string priority
+
  Tags

 (defun org-html--tags (tags info)
@@ -2396,8 +2407,9 @@ holding contextual information.
   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 #xa0;#xa0;#xa0;) tags)))
+(concat todo (and todo  ) priority (and priority  ) text (and
tags #xa0;#xa0;#xa0;) tags)))

 (defun org-html--container (headline info)
   (or (org-element-property :HTML_CONTAINER headline)
-- 
1.9.1