From mboxrd@z Thu Jan 1 00:00:00 1970 From: William Crandall Subject: Re: Testing: org-export-e-html Date: Thu, 31 May 2012 20:56:34 -0700 Message-ID: References: <87396i3p1w.fsf@gmail.com> <87y5o8365b.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8fb2068a96d40f04c1612b16 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:44933) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SaIyc-0005TR-UC for emacs-orgmode@gnu.org; Thu, 31 May 2012 23:56:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SaIya-0003YJ-E8 for emacs-orgmode@gnu.org; Thu, 31 May 2012 23:56:38 -0400 Received: from mail-ob0-f169.google.com ([209.85.214.169]:54921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SaIya-0003Xu-1F for emacs-orgmode@gnu.org; Thu, 31 May 2012 23:56:36 -0400 Received: by obbwd18 with SMTP id wd18so2761926obb.0 for ; Thu, 31 May 2012 20:56:34 -0700 (PDT) In-Reply-To: <87y5o8365b.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, Jambunathan K --e89a8fb2068a96d40f04c1612b16 Content-Type: text/plain; charset=ISO-8859-1 Hello Nicolas, To wrap my neurons around linking, I made a small test batch. There appear to be several difference between the "old" HTML export engine and the current version of the "new". Testing org-to-HTML export: old: C-c C-e h (org-export, in org-exp.el) new: M-x org-export-dispatch h (in org-export.el) Four input permutations: 1. [[directors]] 2. [[#directors]] 3. [[directors][Directors]] 4. [[#directors][Directors]] As I see it (do let me know what I'm getting wrong!), the old version gets all links right. (But "old" makes one error(?) see next section.) 1. [[directors]] old: directors new: directors 2. [[#directors]] old: #directors new: Directors 3. [[directors][Directors]] old: Directors new: Directors 4. [[#directors][Directors]] old: Directors new: Directors In no case is the output the same! #4 would be most useful for my purposes, as it allows identifying target links precisely. -------------------------------------------------- Turning to the output for targets, the new version does not close the tag (as the old version does). Other than that, "new" seems fine. ("Old" generates a
 section from the PROPERTIES drawer,
whether it is open or closed, with your encoding. Not my focus,
but is this an "old" bug?)

Org-mode input:
   * Directors
     :PROPERTIES:
     :CUSTOM_ID: directors
     :END:

HTML output:
old:
   

Directors

   PROPERTIES
   :CUSTOM_ID: directors
   
new:

Directors

[no
 section]
--------------------------------------------------

Thanks again for moving this forward!

-BC
Org-mode: 7.8.11 (release_7.8.11-24-g4144c5)
Emacs: 24.1.50.1
Windows 7



----------------------------------------------------------------------
Full text excerpts follow:    input(org) / output(new) / output(old)
----------------------------------------------------------------------

Input (org-mode)
----------------------------------------------------------------------

#+OPTIONS:   H:3 -:t *:t
#+OPTIONS:   num:nil  toc:nil
#+OPTIONS:   <:nil  timestamp:nil
#+OPTIONS:   author:nil  creator:nil

This is the first paragraph, before any links or sections.

First try, with only word {{directors}}: [[directors]]

Second, with word and hash {{#directors}}: [[#directors]]

Third, with word and target, {{directors}{Directors}}:
[[directors][Directors]]

Fourth, hash-word and target, {{#directors}{Directors}}:
[[#directors][Directors]]

A blank, spacer paragraph, before the target.

* Directors
  :PROPERTIES:
  :CUSTOM_ID: directors
  :END:

Just to end, a closing paragraph.

----------------------------------------------------------------------

Output ("new" engine)   (Also: two extra blank-lines before each 

): ----------------------------------------------------------------------

This is the first paragraph, before any links or sections.

First try, with only word {{directors}}: directors

Second, with word and hash {{#directors}}: Directors

Third, with word and target, {{directors}{Directors}}: Directors

Fourth, hash-word and target, {{#directors}{Directors}}: Directors

A blank, spacer paragraph, before the target.

---------------------------------------------------------------------- Output ("old" engine): ----------------------------------------------------------------------

This is the first paragraph, before any links or sections.

First try, with only word {{directors}}: directors

Second, with word and hash {{#directors}}: #directors

Third, with word and target, {{directors}{Directors}}: Directors

Fourth, hash-word and target, {{#directors}{Directors}}: Directors

A blank, spacer paragraph, before the target.

Directors

PROPERTIES
:CUSTOM_ID: directors

Just to end, a closing paragraph.

-------------------------------------------------[end]---------------- On Thu, May 31, 2012 at 5:08 AM, Nicolas Goaziou wrote: > Hello, > [...] > Again, "#crandall" syntax should be used to target an headline with > "crandall" as value for its custom-id property. See section 4.2 in the > manual. > > --8<---------------cut here---------------start------ ------->8--- > * BC Crandall > :PROPERTIES: > :CUSTOM_ID: crandall > :END: > > [[#crandall][Description]] > --8<---------------cut here---------------end--------------->8--- > > > If you are linking to a target, simply call its name. > > --8<---------------cut here---------------start------ ------->8--- > * <>BC Crandall > > A [[crandall][link]] to headline [[crandall]] > --8<---------------cut here---------------end--------------->8--- > > Notice the difference between the link with or without a description. > > > Regards, > > -- > Nicolas Goaziou > --e89a8fb2068a96d40f04c1612b16 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hello Nicolas,<= /span>

There appear to be severa= l difference between the "old" HTML
= export engine and the current version of the "new".

Testing org-to-HTML export:
=A0=A0 old: C-c C-e h=A0=A0=A0=A0=A0 (org-export, in org-exp.el)
=A0=A0 new: M-x org-expor= t-dispatch h=A0 (in org-export.el)

Four input permutations:

1. [[directors]]
2. [[#= directors]]
3. [[directors][Directors= ]]
4. [[#directors][Directors]]


As I= see it (do let me know what I'm getting wrong!),
the old version ge= ts all links right.

(But "old" makes one error(?) see next section.)
1. [[directors]]
=A0=A0 old: <a href=3D= "#sec-1">directors</a>
=A0= =A0 new: <i>directors</i>

2. [[#directors]]
=A0= =A0 old: <a href=3D"#directors">#directors</a>=
=A0=A0 new: <a href=3D= "#sec-1">Directors</a>

3. [[directors][Directors]]
=A0=A0 old: <a href=3D= "#sec-1">Directors</a>
=A0= =A0 new: <i>Directors</i>

4. [[#directors][Directors]]
=A0=A0 old: <a href=3D"#directors">Directors</a>= ;
=A0=A0 new: <a href=3D= "#sec-1">Directors</a>


In no case is the output = the same!

#4 would be most useful for my purposes, as it allows =
identifying target links = precisely.

--------------------------------------------------

Turning to the output for targets, the new version <= br>does not close the <a> tag (as the old version does).
Other tha= n that, "new" seems fine.

("Old" generates a <pre> section from the PROPERTIES dr= awer,
whether it is open or closed, with your encoding. Not my focus,but is this an "old" bug?)

Org-mode input:
=A0=A0 * Di= rectors
=A0=A0=A0=A0 :PROPERTIES:
=A0=A0=A0=A0 :CUSTOM_ID: directors
=A0=A0= =A0=A0 :END:

HTML output:
old:
=A0=A0 <div id=3D"outli= ne-container-directors" class=3D"outline-2">
=A0=A0 &l= t;h2 id=3D"directors"><a name=3D"sec-1" id=3D&quo= t;sec-1"></a>Directors</h2>
=A0=A0 <div class=3D"outline-text-2" id=3D"text-directors= ">

=A0=A0 <pre class=3D"example">
=A0=A0 = PROPERTIES
=A0=A0 :CUSTOM_ID: directors
=A0=A0 </pre>

ne= w:
=A0=A0 <div id=3D"outline-container-directors" class=3D&= quot;outline-2">
=A0=A0 <h2 id=3D"directors"><a id=3D"sec-1" na= me=3D"sec-1"/>Directors</h2>
=A0=A0 <div class=3D&= quot;outline-text-2" id=3D"text-directors">

=A0=A0= [no <pre> section]
--------------------------------------------------

Thanks again for = moving this forward!

=
-BC
Org-mode: 7.8.11 (release= _7.8.11-24-g4144c5)
<= span style=3D"font-family:courier new,monospace">Emacs: 24.1.50.1
Windows 7



-------------------------= ---------------------------------------------
= Full text excerpts follow:=A0=A0=A0 input(org) / output(new) / output(old)<= /span>
-------------------------= ---------------------------------------------

Input (org-mode)

-------------------------= ---------------------------------------------

#+OPTIONS:=A0=A0 H:3 -:t *:= t

#+OPTIONS:=A0=A0 num:nil= =A0 toc:nil
#+OPTIONS:=A0=A0 <:nil=A0 times= tamp:nil
#+OPTIONS:=A0=A0 author:n= il=A0 creator:nil
This is the first paragraph, before any links or sectio= ns.

First try, with only word {{directors}}: [[directors= ]]

Second, with word and has= h {{#directors}}: [[#directors]]

Third, with word and target, {{directors= }{Directors}}: [[directors][Directors]]

Fourth, hash-word and target, {{#directors}{Director= s}}: [[#directors][Directors]]

A blank, spacer paragraph, before the target.=

* Directors
=A0 :PROPERTIES:
=A0 :CUSTOM_ID: directors=
=A0 :END:

Just to end, a closing paragraph.

-------------------------= ---------------------------------------------

Output ("new" eng= ine)=A0=A0 (Also: two extra blank-lines before each <p>):

-------------------------= ---------------------------------------------

<p>

This is the first paragra= ph, before any links or sections.
</p>


<= p>
First try, with only word {{directors}}:= <i>directors</i>
</p>


<p>
Second, with word and has= h {{#directors}}: <a href=3D"#sec-1">Directors</a>
</p>


<= p>
Third, with word and target, {{directors= }{Directors}}: <i>Directors</i>
</p>


<p>
Fourth, hash-word and tar= get, {{#directors}{Directors}}: <a href=3D"#sec-1">Director= s</a>
</p>


<= p>
A blank, spacer paragraph, before the ta= rget.
</p>

<div id= =3D"outline-container-directors" class=3D"outline-2">= ;
<h2 id=3D"directo= rs"><a id=3D"sec-1" name=3D"sec-1"/>Direc= tors</h2>
<div class=3D"outline-= text-2" id=3D"text-directors">



<= p>
Just to end, a closing paragraph.
</p>
</div>
</div>

----------= ------------------------------------------------------------

Output ("old" engine):
-----------------------------------------------------------------= -----

<p>This is the first paragraph, before any lin= ks or sections.
</p>

<p>
First try, with only word {{directors}}: <a href=3D"#= sec-1">directors</a>
</p>
<p>
Second, with word and has= h {{#directors}}: <a href=3D"#directors">#directors</a&g= t;
</p>
<p>
Third, with word and target, {{directors}{Directors}}: <a = href=3D"#sec-1">Directors</a>
</p>
<p>
Fourth, hash-word and tar= get, {{#directors}{Directors}}: <a href=3D"#directors">Dire= ctors</a>
</p>

<p>
A blank, spacer paragraph, before the target.
</p>

<div id= =3D"outline-container-directors" class=3D"outline-2">= ;
<h2 id=3D"directo= rs"><a name=3D"sec-1" id=3D"sec-1"></a= >Directors</h2>
<div class=3D"= ;outline-text-2" id=3D"text-directors">

<pre class=3D"example">
PROPERTIES
:CUSTOM_ID: directors
</pre>


<= p>
Just to end, a closing paragraph.
</p></div>
</div>

-------------------------------------------------[en= d]----------------



On Thu, May 31, 2012 at 5:08 AM, Nicolas Goaziou <<= a href=3D"mailto:n.goaziou@gmail.com" target=3D"_blank">n.goaziou@gmail.com= > wrote:
= Hello,
<= font>[...]
Again, "#crandall" syntax should be used = to target an headline with
"crandall" as value for its custom-id property. See section 4.2 i= n the
manual.

--8<---------------cut here---------------start------
------->8---
* BC Crandall
=A0:PROPERTIES:
=A0:CUSTOM_ID: crandall
=A0:END:

=A0[[#crandall][Description]]
--8<---------------cut here---------------end--------
------= ->8---


If you are linking to a target, simply call its name.


--8<---------------cut here---------------start------
------->8---
* <<crandall>>BC Crandall

=A0A [[crandall][link]] to headline [[crandall]]
--8<---------------cut here---------------end--------
------= ->8---

Notice the difference between the link with or without a description.


Regards,


--
Nicolas Goaziou

--e89a8fb2068a96d40f04c1612b16--