* [Bug] body-only Export Option Adds Extra html Tags.
@ 2011-03-07 18:10 Ian Barton
2011-03-08 11:59 ` Ian Barton
0 siblings, 1 reply; 8+ messages in thread
From: Ian Barton @ 2011-03-07 18:10 UTC (permalink / raw)
To: emacs-orgmode
If I export body-only in my publishing options and publish a file that
looks like:
#+TITLE: Index for Cycling Pages.
#+STARTUP: showall indent
#+STARTUP: hidestars
#+BEGIN_HTML
---
layout: cycling
title: Cycling.
excerpt: Page about cycling.
---
#+END_HTML
Some text
The resulting html looks like:
<p>
Some text</p>
</div>
</body>
</html>
Note the extra html tags after my text. Not sure exactly when this
started happening, my git bisect skills haven't managed to identify it.
Ian.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Bug] body-only Export Option Adds Extra html Tags.
2011-03-07 18:10 [Bug] body-only Export Option Adds Extra html Tags Ian Barton
@ 2011-03-08 11:59 ` Ian Barton
2011-03-08 14:12 ` Manuel Giraud
0 siblings, 1 reply; 8+ messages in thread
From: Ian Barton @ 2011-03-08 11:59 UTC (permalink / raw)
To: emacs-orgmode
On 07/03/11 18:10, Ian Barton wrote:
> If I export body-only in my publishing options and publish a file that
> looks like:
>
> #+TITLE: Index for Cycling Pages.
> #+STARTUP: showall indent
> #+STARTUP: hidestars
> #+BEGIN_HTML
> ---
> layout: cycling
> title: Cycling.
> excerpt: Page about cycling.
> ---
> #+END_HTML
>
> Some text
>
> The resulting html looks like:
>
> <p>
> Some text</p>
> </div>
> </body>
> </html>
>
> Note the extra html tags after my text. Not sure exactly when this
> started happening, my git bisect skills haven't managed to identify it.
>
Managed to get git bisect to work for me. The last sha where I get git
bisect good is:
f9c833dad015b7847f659e06bac8690b9d7d3794 deprecating begin_dot and
begin_ditaa blocks.
So it looks like SHA:
da8dc7bba72613131f97a28f1c4a912b8d85d7cc Rewrite the handling of HTML
preamble/postamble caused the problem.
Ian.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Bug] body-only Export Option Adds Extra html Tags.
2011-03-08 11:59 ` Ian Barton
@ 2011-03-08 14:12 ` Manuel Giraud
2011-03-08 14:30 ` Manuel Giraud
2011-03-08 14:34 ` Bernt Hansen
0 siblings, 2 replies; 8+ messages in thread
From: Manuel Giraud @ 2011-03-08 14:12 UTC (permalink / raw)
To: lists; +Cc: emacs-orgmode
Ian Barton <lists@manor-farm.org> writes:
> So it looks like SHA:
>
> da8dc7bba72613131f97a28f1c4a912b8d85d7cc Rewrite the handling of HTML
> preamble/postamble caused the problem.
I'll have a look at that. Is the </div> and </body> with no opening a
normal behaviour for the :body-only option ?
--
Manuel Giraud
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Bug] body-only Export Option Adds Extra html Tags.
2011-03-08 14:12 ` Manuel Giraud
@ 2011-03-08 14:30 ` Manuel Giraud
2011-03-08 18:02 ` Ian Barton
` (2 more replies)
2011-03-08 14:34 ` Bernt Hansen
1 sibling, 3 replies; 8+ messages in thread
From: Manuel Giraud @ 2011-03-08 14:30 UTC (permalink / raw)
To: lists; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 441 bytes --]
Manuel Giraud <manuel.giraud@univ-nantes.fr> writes:
> Ian Barton <lists@manor-farm.org> writes:
>
>> So it looks like SHA:
>>
>> da8dc7bba72613131f97a28f1c4a912b8d85d7cc Rewrite the handling of HTML
>> preamble/postamble caused the problem.
>
> I'll have a look at that. Is the </div> and </body> with no opening a
> normal behaviour for the :body-only option ?
Ok this one was easy. Here's a patch that correct the body-only
behaviour.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0003-correct-tag-closing-for-body-only.patch --]
[-- Type: text/x-patch, Size: 772 bytes --]
From 82f25397a156e34d21339a5499c9a52c1b46f333 Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel.giraud@univ-nantes.fr>
Date: Tue, 8 Mar 2011 15:22:30 +0100
Subject: [PATCH 3/3] correct tag closing for body-only
---
lisp/org-html.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lisp/org-html.el b/lisp/org-html.el
index 54cbf36..c60c90d 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -1715,7 +1715,7 @@ lang=\"%s\" xml:lang=\"%s\">
(if org-export-html-with-timestamp
(insert org-export-html-html-helper-timestamp))
- (insert "\n</div>\n</body>\n</html>\n")
+ (unless body-only (insert "\n</div>\n</body>\n</html>\n"))
(unless (plist-get opt-plist :buffer-will-be-killed)
(normal-mode)
--
1.7.1
[-- Attachment #3: Type: text/plain, Size: 19 bytes --]
--
Manuel Giraud
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Bug] body-only Export Option Adds Extra html Tags.
2011-03-08 14:30 ` Manuel Giraud
@ 2011-03-08 18:02 ` Ian Barton
2011-03-09 10:29 ` [Accepted] [O, Bug] " Bastien Guerry
2011-03-09 10:29 ` [Bug] " Bastien
2 siblings, 0 replies; 8+ messages in thread
From: Ian Barton @ 2011-03-08 18:02 UTC (permalink / raw)
To: Manuel Giraud; +Cc: emacs-orgmode
On 08/03/11 14:30, Manuel Giraud wrote:
> Manuel Giraud<manuel.giraud@univ-nantes.fr> writes:
>
>> Ian Barton<lists@manor-farm.org> writes:
>>
>>> So it looks like SHA:
>>>
>>> da8dc7bba72613131f97a28f1c4a912b8d85d7cc Rewrite the handling of HTML
>>> preamble/postamble caused the problem.
>>
>> I'll have a look at that. Is the</div> and</body> with no opening a
>> normal behaviour for the :body-only option ?
>
> Ok this one was easy. Here's a patch that correct the body-only
> behaviour.
>
>
Thanks, I have tested the patch and can confirm it fixes the problem.
Ian.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Accepted] [O, Bug] body-only Export Option Adds Extra html Tags.
2011-03-08 14:30 ` Manuel Giraud
2011-03-08 18:02 ` Ian Barton
@ 2011-03-09 10:29 ` Bastien Guerry
2011-03-09 10:29 ` [Bug] " Bastien
2 siblings, 0 replies; 8+ messages in thread
From: Bastien Guerry @ 2011-03-09 10:29 UTC (permalink / raw)
To: emacs-orgmode
Patch 662 (http://patchwork.newartisans.com/patch/662/) is now "Accepted".
Maintainer comment: none
This relates to the following submission:
http://mid.gmane.org/%3C87fwqx3csc.fsf%40univ-nantes.fr%3E
Here is the original message containing the patch:
> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O,Bug] body-only Export Option Adds Extra html Tags.
> Date: Tue, 08 Mar 2011 19:30:27 -0000
> From: Manuel Giraud <manuel.giraud@univ-nantes.fr>
> X-Patchwork-Id: 662
> Message-Id: <87fwqx3csc.fsf@univ-nantes.fr>
> To: lists@manor-farm.org
> Cc: emacs-orgmode@gnu.org
>
> Manuel Giraud <manuel.giraud@univ-nantes.fr> writes:
>
> > Ian Barton <lists@manor-farm.org> writes:
> >
> >> So it looks like SHA:
> >>
> >> da8dc7bba72613131f97a28f1c4a912b8d85d7cc Rewrite the handling of HTML
> >> preamble/postamble caused the problem.
> >
> > I'll have a look at that. Is the </div> and </body> with no opening a
> > normal behaviour for the :body-only option ?
>
> Ok this one was easy. Here's a patch that correct the body-only
> behaviour.
>
>
> >From 82f25397a156e34d21339a5499c9a52c1b46f333 Mon Sep 17 00:00:00 2001
> From: Manuel Giraud <manuel.giraud@univ-nantes.fr>
> Date: Tue, 8 Mar 2011 15:22:30 +0100
> Subject: [PATCH 3/3] correct tag closing for body-only
>
> ---
> lisp/org-html.el | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/lisp/org-html.el b/lisp/org-html.el
> index 54cbf36..c60c90d 100644
> --- a/lisp/org-html.el
> +++ b/lisp/org-html.el
> @@ -1715,7 +1715,7 @@ lang=\"%s\" xml:lang=\"%s\">
> (if org-export-html-with-timestamp
> (insert org-export-html-html-helper-timestamp))
>
> - (insert "\n</div>\n</body>\n</html>\n")
> + (unless body-only (insert "\n</div>\n</body>\n</html>\n"))
>
> (unless (plist-get opt-plist :buffer-will-be-killed)
> (normal-mode)
> --
> 1.7.1
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Bug] body-only Export Option Adds Extra html Tags.
2011-03-08 14:30 ` Manuel Giraud
2011-03-08 18:02 ` Ian Barton
2011-03-09 10:29 ` [Accepted] [O, Bug] " Bastien Guerry
@ 2011-03-09 10:29 ` Bastien
2 siblings, 0 replies; 8+ messages in thread
From: Bastien @ 2011-03-09 10:29 UTC (permalink / raw)
To: Manuel Giraud; +Cc: emacs-orgmode
Manuel Giraud <manuel.giraud@univ-nantes.fr> writes:
> Ok this one was easy. Here's a patch that correct the body-only
> behaviour.
Thanks for this!
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Bug] body-only Export Option Adds Extra html Tags.
2011-03-08 14:12 ` Manuel Giraud
2011-03-08 14:30 ` Manuel Giraud
@ 2011-03-08 14:34 ` Bernt Hansen
1 sibling, 0 replies; 8+ messages in thread
From: Bernt Hansen @ 2011-03-08 14:34 UTC (permalink / raw)
To: Manuel Giraud; +Cc: emacs-orgmode
Manuel Giraud <manuel.giraud@univ-nantes.fr> writes:
> Ian Barton <lists@manor-farm.org> writes:
>
>> So it looks like SHA:
>>
>> da8dc7bba72613131f97a28f1c4a912b8d85d7cc Rewrite the handling of HTML
>> preamble/postamble caused the problem.
>
> I'll have a look at that. Is the </div> and </body> with no opening a
> normal behaviour for the :body-only option ?
No it's not normal.
I think :body-only should only include content _between_ the <body> and
</body> tags in the HTML output. Everything is else removed.
Regards,
--
Bernt
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-03-09 10:29 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-07 18:10 [Bug] body-only Export Option Adds Extra html Tags Ian Barton
2011-03-08 11:59 ` Ian Barton
2011-03-08 14:12 ` Manuel Giraud
2011-03-08 14:30 ` Manuel Giraud
2011-03-08 18:02 ` Ian Barton
2011-03-09 10:29 ` [Accepted] [O, Bug] " Bastien Guerry
2011-03-09 10:29 ` [Bug] " Bastien
2011-03-08 14:34 ` Bernt Hansen
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).