* Export as HTML does not preserve nonstandard entities as TODO signs
@ 2011-10-14 15:47 Arne Babenhauserheide
2011-10-16 6:39 ` Christian Moe
0 siblings, 1 reply; 8+ messages in thread
From: Arne Babenhauserheide @ 2011-10-14 15:47 UTC (permalink / raw)
To: emacs-orgmode
Hi,
I started using ✔ and ❢ as replacement for DONE und TODO and I realized that they get replaced by an underscore (_) in HTML output. Since I really like using symbols for TODO and DONE¹, I wanted to ask, if this is a bug.
Best wishes,
Arne
¹: Just compare:
* ✔ Sent bug question
* ❢ check for response
and
* DONE Sent bug question
* TODO check for response
PS: I actually have ✔ on my keyboard, and C-c C-t makes it easy to use any kind of symbol for TODO states which is supported by the font.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Export as HTML does not preserve nonstandard entities as TODO signs
2011-10-14 15:47 Export as HTML does not preserve nonstandard entities as TODO signs Arne Babenhauserheide
@ 2011-10-16 6:39 ` Christian Moe
2011-10-16 8:05 ` Arne Babenhauserheide
0 siblings, 1 reply; 8+ messages in thread
From: Christian Moe @ 2011-10-16 6:39 UTC (permalink / raw)
To: arne_bab; +Cc: emacs-orgmode
Hi,
I can't reproduce this. After adding your example to a test buffer and
re-saving the buffer, I get the expected html export. (Before
resaving, the buffer was still exported in iso-8859-1, producing
garbage -- but not underscores -- in html; after resaving, in utf-8.)
With point in your example buffer, what does `C-h v
buffer-file-coding-system' say?
Yours,
Christian
On 10/14/11 5:47 PM, Arne Babenhauserheide wrote:
> Hi,
>
> I started using ✔ and ❢ as replacement for DONE und TODO and I realized that they get replaced by an underscore (_) in HTML output. Since I really like using symbols for TODO and DONE¹, I wanted to ask, if this is a bug.
>
> Best wishes,
> Arne
>
> ¹: Just compare:
>
> * ✔ Sent bug question
> * ❢ check for response
>
> and
>
> * DONE Sent bug question
> * TODO check for response
>
> PS: I actually have ✔ on my keyboard, and C-c C-t makes it easy to use any kind of symbol for TODO states which is supported by the font.
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Export as HTML does not preserve nonstandard entities as TODO signs
2011-10-16 6:39 ` Christian Moe
@ 2011-10-16 8:05 ` Arne Babenhauserheide
2011-10-16 14:33 ` Christian Moe
2011-10-16 14:36 ` [PATCH] " Christian Moe
0 siblings, 2 replies; 8+ messages in thread
From: Arne Babenhauserheide @ 2011-10-16 8:05 UTC (permalink / raw)
To: mail; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1147 bytes --]
Hi Cristian,
Am Sonntag, 16. Oktober 2011, 08:39:08 schrieb Christian Moe:
> On 10/14/11 5:47 PM, Arne Babenhauserheide wrote:
> > I started using ✔ and ❢ as replacement for DONE und TODO and I realized
> > that they get replaced by an underscore (_) in HTML output. Since I
> > really like using symbols for TODO and DONE¹, I wanted to ask, if this
> > is a bug.
> I can't reproduce this. After adding your example to a test buffer and
> re-saving the buffer, I get the expected html export. (Before
> resaving, the buffer was still exported in iso-8859-1, producing
> garbage -- but not underscores -- in html; after resaving, in utf-8.)
>
> With point in your example buffer, what does `C-h v
> buffer-file-coding-system' say?
Its value is utf-8-unix
Local in buffer emacs-plan.org; global value is utf-8
What I get is output like this:
<h3 id="sec-11-10"><span class="section-number-3">11.10</span> <span
class="done ✔"> _</span> Müll runter </h3>
(copied to the clipboard)
Interesting is that ✔ gets correctly exported as class name, but not as
identifier in the text.
Best wishes,
Arne
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 316 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Export as HTML does not preserve nonstandard entities as TODO signs
2011-10-16 8:05 ` Arne Babenhauserheide
@ 2011-10-16 14:33 ` Christian Moe
2011-10-17 5:35 ` Arne Babenhauserheide
2011-10-16 14:36 ` [PATCH] " Christian Moe
1 sibling, 1 reply; 8+ messages in thread
From: Christian Moe @ 2011-10-16 14:33 UTC (permalink / raw)
To: Arne Babenhauserheide; +Cc: emacs-orgmode
Hi,
First, sorry about the noise: I had failed to activate your symbols as
TODO keywords. Now I do reproduce your results.
It also doesn't seem to help to add your special characters to Emacs
word syntax, as the FAQ says you should.
http://orgmode.org/worg/org-faq.html#sec-9-6
I think there's a bug in org-html.el (org-export-as-html), around line
1611. A function that is meant to get a valid class name for the todo
keyword is not called when the class attribute of the span tag is
inserted, but a line below, where the visible text content of the
span tag is inserted. I'm posting a patch.
Yours,
Christian
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] Re: Export as HTML does not preserve nonstandard entities as TODO signs
2011-10-16 8:05 ` Arne Babenhauserheide
2011-10-16 14:33 ` Christian Moe
@ 2011-10-16 14:36 ` Christian Moe
2011-12-11 17:57 ` Bastien
1 sibling, 1 reply; 8+ messages in thread
From: Christian Moe @ 2011-10-16 14:36 UTC (permalink / raw)
To: Arne Babenhauserheide; +Cc: emacs-orgmode
Correct html export of todo keywords
* org-html.el (org-export-as-html): Apply
org-export-html-get-todo-kwd-class-name to the the class attribute
of the todo-keyword span tag, not to its text content
The problem was that special characters in todo keywords were being
replaced by underscore. This was meant to happen to the class
attributes set around them.
TINYCHANGE
This only swaps two arguments to a concat.
diff --git a/lisp/org-html.el b/lisp/org-html.el
index a2a9426..47adfd2 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -1608,9 +1608,9 @@ lang=\"%s\" xml:lang=\"%s\">
(if (member (match-string 2 line)
org-done-keywords)
"done" "todo")
- " " (match-string 2 line)
- "\"> " (org-export-html-get-todo-kwd-class-name
- (match-string 2 line))
+ " " (org-export-html-get-todo-kwd-class-name
+ (match-string 2 line))
+ "\"> " (match-string 2 line)
"</span>" (substring line (match-end 2)))))
;; Does this contain a reference to a footnote?
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: Export as HTML does not preserve nonstandard entities as TODO signs
2011-10-16 14:33 ` Christian Moe
@ 2011-10-17 5:35 ` Arne Babenhauserheide
0 siblings, 0 replies; 8+ messages in thread
From: Arne Babenhauserheide @ 2011-10-17 5:35 UTC (permalink / raw)
To: mail; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 441 bytes --]
Am Sonntag, 16. Oktober 2011, 16:33:52 schrieb Christian Moe:
> First, sorry about the noise: I had failed to activate your symbols as
> TODO keywords. Now I do reproduce your results.
No problem and many thanks for checking - and fixing!
As soon as it’s in the emacs 24 repo, I can test it.
Best wishes,
Arne
--
1w6 sie zu achten,
sie alle zu finden,
in Spiele zu leiten
und sacht zu verbinden.
→ http://1w6.org
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 316 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Re: Export as HTML does not preserve nonstandard entities as TODO signs
2011-10-16 14:36 ` [PATCH] " Christian Moe
@ 2011-12-11 17:57 ` Bastien
2011-12-11 19:38 ` Christian Moe
0 siblings, 1 reply; 8+ messages in thread
From: Bastien @ 2011-12-11 17:57 UTC (permalink / raw)
To: mail; +Cc: Arne Babenhauserheide, emacs-orgmode
Hi Christian,
Christian Moe <mail@christianmoe.com> writes:
> Correct html export of todo keywords
>
> * org-html.el (org-export-as-html): Apply
> org-export-html-get-todo-kwd-class-name to the the class attribute
> of the todo-keyword span tag, not to its text content
Applied, thanks!
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Re: Export as HTML does not preserve nonstandard entities as TODO signs
2011-12-11 17:57 ` Bastien
@ 2011-12-11 19:38 ` Christian Moe
0 siblings, 0 replies; 8+ messages in thread
From: Christian Moe @ 2011-12-11 19:38 UTC (permalink / raw)
To: Bastien; +Cc: Arne Babenhauserheide, emacs-orgmode
On 12/11/11 6:57 PM, Bastien wrote:
> Applied, thanks!
>
Thanks.
Yours,
Christian
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-12-11 19:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-14 15:47 Export as HTML does not preserve nonstandard entities as TODO signs Arne Babenhauserheide
2011-10-16 6:39 ` Christian Moe
2011-10-16 8:05 ` Arne Babenhauserheide
2011-10-16 14:33 ` Christian Moe
2011-10-17 5:35 ` Arne Babenhauserheide
2011-10-16 14:36 ` [PATCH] " Christian Moe
2011-12-11 17:57 ` Bastien
2011-12-11 19:38 ` Christian Moe
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.