* Spurious elements in HTML export
@ 2014-05-15 8:42 Fabrice Popineau
2014-05-15 8:55 ` Bastien
2014-05-15 11:46 ` Nicolas Goaziou
0 siblings, 2 replies; 7+ messages in thread
From: Fabrice Popineau @ 2014-05-15 8:42 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 2615 bytes --]
Hi,
Using the HTML exporter, I easily get spurious empty elements.
Example:
Org-mode:
* Section
[2014-05-15 jeu. 10:29]
** Subsection 1
[2014-05-15 jeu. 10:28]
Foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo
bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo
bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
** Subsection 2
[2014-05-15 jeu. 10:29]
Foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo
bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo
bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
After C-c C-e C-s C-b h H, HTML:
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">1. Subsection 1</a></li>
<li><a href="#sec-2">2. Subsection 2</a></li>
</ul>
</div>
</div>
<div class="figure">
<p>
</p>
</div>
<div id="outline-container-sec-1" class="outline-2">
<h2 id="sec-1"><span class="section-number-2">1</span> Subsection 1</h2>
<div class="outline-text-2" id="text-1">
<div class="figure">
<p>
</p>
</div>
<p>
Foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo
bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo
bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
</p>
</div>
</div>
<div id="outline-container-sec-2" class="outline-2">
<h2 id="sec-2"><span class="section-number-2">2</span> Subsection 2</h2>
<div class="outline-text-2" id="text-2">
<div class="figure">
<p>
</p>
</div>
<p>
Foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo
bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo
bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
</p>
</div>
</div>
My questions:
- is this what is expected ?
- why those 3 <p></p> ?
- why are they surrounded by those divs ?
I don't see the point in generating those empty <p></p> elements, and even
less in wrapping them with figure class.
If I remove the empty lines following the date/time stamps, then I get
only the first of those empty blocks.
However, doing this, I trigger what i think is inconsistent between the
HTML and the LaTeX exporter: if there is no empty line after the date
stamp, the LaTeX exporter exports the date stamp. The HTML exporter doesn't.
Thanks for clarifications on this topic.
--
Fabrice
[-- Attachment #2: Type: text/html, Size: 4233 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Spurious elements in HTML export
2014-05-15 8:42 Spurious elements in HTML export Fabrice Popineau
@ 2014-05-15 8:55 ` Bastien
2014-05-15 9:20 ` Fabrice Popineau
2014-05-15 11:46 ` Nicolas Goaziou
1 sibling, 1 reply; 7+ messages in thread
From: Bastien @ 2014-05-15 8:55 UTC (permalink / raw)
To: Fabrice Popineau; +Cc: emacs-orgmode@gnu.org
Hi Fabrice,
Fabrice Popineau <fabrice.popineau@gmail.com> writes:
> Using the HTML exporter, I easily get spurious empty elements.
I can't reproduce this. Do you have a recipe with a minimal
configuration ?
Also mention your Org and Emacs version.
Thanks,
--
Bastien
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Spurious elements in HTML export
2014-05-15 8:55 ` Bastien
@ 2014-05-15 9:20 ` Fabrice Popineau
2014-05-15 9:26 ` Fabrice Popineau
2014-05-15 9:45 ` Bastien
0 siblings, 2 replies; 7+ messages in thread
From: Fabrice Popineau @ 2014-05-15 9:20 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 1214 bytes --]
2014-05-15 10:55 GMT+02:00 Bastien <bzg@gnu.org>:
> Hi Fabrice,
>
> Fabrice Popineau <fabrice.popineau@gmail.com> writes:
>
> > Using the HTML exporter, I easily get spurious empty elements.
>
> I can't reproduce this. Do you have a recipe with a minimal
> configuration ?
>
>
This is already good to know!
I'll try to bisect my emacs config.
Recipe : the sole org fragment from my message in an org buffer,
and export the subtree in an html buffer with C-c C-e C-s C-b h H
> Also mention your Org and Emacs version.
>
>
Org: git latest (from today). Emacs 24.4 (trunk devel, under Windows, yeah
I know ...).
I suspect the problem might come from org-html-standalone-image-p
(incorrectly finding an image for an empty paragraph) or even from
org-string-nw-p.
What org-string-nw-p should return on a string with the single EOL
character?
BTW, I wonder if org-html-standalone-image-p does actually what is
documented. It is documented
as returning non-nil in one of two cases: element is of type paragraph or
of type link.
But its code starts with:
(and (eq (org-element-type paragraph) 'paragraph)
...)
which seems to prevent the second case. That is certainly unrelated to my
problem.
Fabrice
[-- Attachment #2: Type: text/html, Size: 2191 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Spurious elements in HTML export
2014-05-15 9:20 ` Fabrice Popineau
@ 2014-05-15 9:26 ` Fabrice Popineau
2014-05-15 9:45 ` Bastien
1 sibling, 0 replies; 7+ messages in thread
From: Fabrice Popineau @ 2014-05-15 9:26 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 463 bytes --]
>
>
> BTW, I wonder if org-html-standalone-image-p does actually what is
> documented. It is documented
> as returning non-nil in one of two cases: element is of type paragraph or
> of type link.
> But its code starts with:
>
> (and (eq (org-element-type paragraph) 'paragraph)
> ...)
>
> which seems to prevent the second case. That is certainly unrelated to my
> problem.
>
>
Sorry. I misread the code. Forget about this false interpretation.
Fabrice
[-- Attachment #2: Type: text/html, Size: 967 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Spurious elements in HTML export
2014-05-15 9:20 ` Fabrice Popineau
2014-05-15 9:26 ` Fabrice Popineau
@ 2014-05-15 9:45 ` Bastien
1 sibling, 0 replies; 7+ messages in thread
From: Bastien @ 2014-05-15 9:45 UTC (permalink / raw)
To: Fabrice Popineau; +Cc: emacs-orgmode@gnu.org
Let's first try to safely reproduce the problem before pointing
fingers on some functions -- bisecting your config will surely
help!
--
Bastien
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Spurious elements in HTML export
2014-05-15 8:42 Spurious elements in HTML export Fabrice Popineau
2014-05-15 8:55 ` Bastien
@ 2014-05-15 11:46 ` Nicolas Goaziou
2014-05-15 12:37 ` Fabrice Popineau
1 sibling, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2014-05-15 11:46 UTC (permalink / raw)
To: Fabrice Popineau; +Cc: emacs-orgmode@gnu.org
Hello,
Fabrice Popineau <fabrice.popineau@gmail.com> writes:
> Using the HTML exporter, I easily get spurious empty elements.
> Example:
>
> Org-mode:
>
> * Section
> [2014-05-15 jeu. 10:29]
>
> ** Subsection 1
> [2014-05-15 jeu. 10:28]
[...]
> <div id="table-of-contents">
> <h2>Table of Contents</h2>
> <div id="text-table-of-contents">
> <ul>
> <li><a href="#sec-1">1. Subsection 1</a></li>
> <li><a href="#sec-2">2. Subsection 2</a></li>
> </ul>
> </div>
> </div>
>
> <div class="figure">
> <p>
> </p>
> </div>
This should be fixed. Thank you for reporting it.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Spurious elements in HTML export
2014-05-15 11:46 ` Nicolas Goaziou
@ 2014-05-15 12:37 ` Fabrice Popineau
0 siblings, 0 replies; 7+ messages in thread
From: Fabrice Popineau @ 2014-05-15 12:37 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 321 bytes --]
>
>
> This should be fixed. Thank you for reporting it.
>
>
>
Thanks for fixing it (and so quickly).
I have seen what went wrong in org-html-standalone-image-p
albeit I don't know what triggered it in my setup.
It has been an opportunity to remove a huge pile of old stuff from my Org
config :-)
Best regards,
Fabrice
[-- Attachment #2: Type: text/html, Size: 743 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-05-15 12:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-15 8:42 Spurious elements in HTML export Fabrice Popineau
2014-05-15 8:55 ` Bastien
2014-05-15 9:20 ` Fabrice Popineau
2014-05-15 9:26 ` Fabrice Popineau
2014-05-15 9:45 ` Bastien
2014-05-15 11:46 ` Nicolas Goaziou
2014-05-15 12:37 ` Fabrice Popineau
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).