From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabrice Popineau Subject: Spurious elements in HTML export Date: Thu, 15 May 2014 10:42:15 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=90e6ba1efb9656a22a04f96c479d Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkrFO-0003SI-40 for emacs-orgmode@gnu.org; Thu, 15 May 2014 04:42:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkrFM-0007lP-IP for emacs-orgmode@gnu.org; Thu, 15 May 2014 04:42:38 -0400 Received: from mail-ie0-x232.google.com ([2607:f8b0:4001:c03::232]:35802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkrFM-0007l8-CP for emacs-orgmode@gnu.org; Thu, 15 May 2014 04:42:36 -0400 Received: by mail-ie0-f178.google.com with SMTP id rd18so700580iec.23 for ; Thu, 15 May 2014 01:42:35 -0700 (PDT) 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" --90e6ba1efb9656a22a04f96c479d Content-Type: text/plain; charset=UTF-8 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:

Table of Contents

1 Subsection 1

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

2 Subsection 2

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

My questions: - is this what is expected ? - why those 3

? - why are they surrounded by those divs ? I don't see the point in generating those empty

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 --90e6ba1efb9656a22a04f96c479d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

Using the HTML exporter, I easily g= et spurious empty elements.
Example:

Org= -mode:

* Section
[2014-05-15 jeu. 1= 0: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 f= oo 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=3D"table-of-contents">
<= h2>Table of Contents</h2>
<div id=3D"text-table-of-contents">
<ul&g= t;
<li><a href=3D"#sec-1">1. Subsection 1&l= t;/a></li>
<li><a href=3D"#sec-2">= 2. Subsection 2</a></li>
</ul>
</div>
</div>
<div class=3D"figure">
<p>
</p>
</div>

<div i= d=3D"outline-container-sec-1" class=3D"outline-2">
<h2 id=3D"sec-1"><span class=3D"section-number= -2">1</span> Subsection 1</h2>
<div class= =3D"outline-text-2" id=3D"text-1">

<div class=3D"figure">
<p>
</p= >
</div>

<p>
Fo= o 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=3D"outline-container-sec-2" class=3D"= outline-2">
<h2 id=3D"sec-2"><span cla= ss=3D"section-number-2">2</span> Subsection 2</h2>=
<div class=3D"outline-text-2" id=3D"text-2">=

<div class=3D"figure">
= <p>
</p>
</div>

<= 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 f= oo 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 surrounde= d by those divs ?

I don't see the point in gen= erating those empty <p></p> elements, and even less in wrapping= them with figure class.

If I remove the empty lines following the date/time sta= mps, then =C2=A0I get only the first of those empty blocks.
Howev= er, 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 La= TeX exporter exports the date stamp. The HTML exporter doesn't.

Thanks for clarifications on this topic.

=
--
Fabrice
--90e6ba1efb9656a22a04f96c479d-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Spurious elements in HTML export Date: Thu, 15 May 2014 10:55:27 +0200 Message-ID: <87wqdnv2tc.fsf@bzg.ath.cx> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkrS2-0000V6-2t for emacs-orgmode@gnu.org; Thu, 15 May 2014 04:55:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkrRq-0004bw-Pj for emacs-orgmode@gnu.org; Thu, 15 May 2014 04:55:42 -0400 Received: from mail-wg0-x22b.google.com ([2a00:1450:400c:c00::22b]:40879) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkrRq-0004bY-I6 for emacs-orgmode@gnu.org; Thu, 15 May 2014 04:55:30 -0400 Received: by mail-wg0-f43.google.com with SMTP id l18so3136307wgh.14 for ; Thu, 15 May 2014 01:55:29 -0700 (PDT) In-Reply-To: (Fabrice Popineau's message of "Thu, 15 May 2014 10:42:15 +0200") 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: Fabrice Popineau Cc: "emacs-orgmode@gnu.org" Hi Fabrice, Fabrice Popineau 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabrice Popineau Subject: Re: Spurious elements in HTML export Date: Thu, 15 May 2014 11:20:41 +0200 Message-ID: References: <87wqdnv2tc.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1133ba66c532d104f96cd00c Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wkrqb-0003Fb-Qa for emacs-orgmode@gnu.org; Thu, 15 May 2014 05:21:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkrqX-0006qv-R2 for emacs-orgmode@gnu.org; Thu, 15 May 2014 05:21:05 -0400 In-Reply-To: <87wqdnv2tc.fsf@bzg.ath.cx> 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: Bastien Cc: "emacs-orgmode@gnu.org" --001a1133ba66c532d104f96cd00c Content-Type: text/plain; charset=UTF-8 2014-05-15 10:55 GMT+02:00 Bastien : > Hi Fabrice, > > Fabrice Popineau 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 --001a1133ba66c532d104f96cd00c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable



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. =C2=A0Do you have a recipe with a minimal=
configuration ?


This is already good to know!
I'll try to bisect my emacs config.

Reci= pe : 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

=C2=A0
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 (incorrec= tly finding an image for an empty paragraph) or even from org-string-nw-p.<= /div>

What org-string-nw-p should return on a string with the= single EOL character?

BTW, I wonder if org-html-s= tandalone-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:

<= div>=C2=A0(and (eq (org-element-type paragraph) 'paragraph)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 ...)

which seems to prevent the second case. That is certain= ly unrelated to my problem.

Fabrice
--001a1133ba66c532d104f96cd00c-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabrice Popineau Subject: Re: Spurious elements in HTML export Date: Thu, 15 May 2014 11:26:07 +0200 Message-ID: References: <87wqdnv2tc.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113a637233ac6304f96ce470 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wkrvo-0007lz-Fx for emacs-orgmode@gnu.org; Thu, 15 May 2014 05:26:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wkrvn-0000h7-Pr for emacs-orgmode@gnu.org; Thu, 15 May 2014 05:26:28 -0400 In-Reply-To: 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: Bastien Cc: "emacs-orgmode@gnu.org" --001a113a637233ac6304f96ce470 Content-Type: text/plain; charset=UTF-8 > > > 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 --001a113a637233ac6304f96ce470 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

BTW, I wonder if org-html-standalone-image-p does actua= lly 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:

<= div>=C2=A0(and (eq (org-element-type paragraph) 'paragraph)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 ...)

which seems to prevent the second case. That is certain= ly unrelated to my problem.


Sorry. I misread the code. Forget about this false interpretatio= n.

Fabrice
--001a113a637233ac6304f96ce470-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Spurious elements in HTML export Date: Thu, 15 May 2014 11:45:47 +0200 Message-ID: <87fvkbtlx0.fsf@bzg.ath.cx> References: <87wqdnv2tc.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WksEh-0001pT-RU for emacs-orgmode@gnu.org; Thu, 15 May 2014 05:46:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WksEY-0000bD-SZ for emacs-orgmode@gnu.org; Thu, 15 May 2014 05:45:59 -0400 Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]:45103) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WksEY-0000ag-Cc for emacs-orgmode@gnu.org; Thu, 15 May 2014 05:45:50 -0400 Received: by mail-wi0-f178.google.com with SMTP id hm4so3840919wib.17 for ; Thu, 15 May 2014 02:45:49 -0700 (PDT) In-Reply-To: (Fabrice Popineau's message of "Thu, 15 May 2014 11:20:41 +0200") 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: 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Spurious elements in HTML export Date: Thu, 15 May 2014 13:46:57 +0200 Message-ID: <87tx8rl0we.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33300) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wku7Q-0006R6-LB for emacs-orgmode@gnu.org; Thu, 15 May 2014 07:46:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wku7E-0004Fa-95 for emacs-orgmode@gnu.org; Thu, 15 May 2014 07:46:36 -0400 Received: from mail-wg0-x229.google.com ([2a00:1450:400c:c00::229]:55402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wku7E-0004FK-1t for emacs-orgmode@gnu.org; Thu, 15 May 2014 07:46:24 -0400 Received: by mail-wg0-f41.google.com with SMTP id z12so3281495wgg.0 for ; Thu, 15 May 2014 04:46:22 -0700 (PDT) In-Reply-To: (Fabrice Popineau's message of "Thu, 15 May 2014 10:42:15 +0200") 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: Fabrice Popineau Cc: "emacs-orgmode@gnu.org" Hello, Fabrice Popineau 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] [...] >
>

Table of Contents

> >
> >
>

>

>
This should be fixed. Thank you for reporting it. Regards, -- Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabrice Popineau Subject: Re: Spurious elements in HTML export Date: Thu, 15 May 2014 14:37:15 +0200 Message-ID: References: <87tx8rl0we.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bd75266be0ae004f96f8f1c Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wkuum-0003G7-UJ for emacs-orgmode@gnu.org; Thu, 15 May 2014 08:37:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wkuum-0006p5-5j for emacs-orgmode@gnu.org; Thu, 15 May 2014 08:37:36 -0400 Received: from mail-ie0-x22c.google.com ([2607:f8b0:4001:c03::22c]:54264) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wkuum-0006ou-0R for emacs-orgmode@gnu.org; Thu, 15 May 2014 08:37:36 -0400 Received: by mail-ie0-f172.google.com with SMTP id as1so922000iec.31 for ; Thu, 15 May 2014 05:37:35 -0700 (PDT) In-Reply-To: <87tx8rl0we.fsf@gmail.com> 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: Nicolas Goaziou Cc: "emacs-orgmode@gnu.org" --047d7bd75266be0ae004f96f8f1c Content-Type: text/plain; charset=UTF-8 > > > 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 --047d7bd75266be0ae004f96f8f1c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

This should be fixed. Thank you for reporting it.



Thanks for fixing it (and so quickly).=

I have seen what went wrong in=C2=A0org-html-stan= dalone-image-p=C2=A0
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,

<= div>Fabrice
--047d7bd75266be0ae004f96f8f1c--