all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Org-Mode Homepage error
@ 2011-07-25 19:33 Renger van Nieuwkoop
  2011-07-25 19:42 ` Michael Markert
  0 siblings, 1 reply; 18+ messages in thread
From: Renger van Nieuwkoop @ 2011-07-25 19:33 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 160 bytes --]

Hi
The hyperlinks on the left of the change page (http://orgmode.org/Changes.html) do not work (Firefox and Chrome).
Renger

_________________________



[-- Attachment #2: Type: text/html, Size: 735 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Org-Mode Homepage error
  2011-07-25 19:33 Org-Mode Homepage error Renger van Nieuwkoop
@ 2011-07-25 19:42 ` Michael Markert
       [not found]   ` <2152B3DFC552DE47A0A36CCC93D735310439FF7D@mx01.ecoplan.local>
                     ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Michael Markert @ 2011-07-25 19:42 UTC (permalink / raw)
  To: Renger van Nieuwkoop; +Cc: emacs-orgmode@gnu.org

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

On 25 Jul 2011, Renger van Nieuwkoop wrote:
> Hi The hyperlinks on the left of the change page
> (http://orgmode.org/Changes.html) do not work (Firefox and Chrome).

I can't confirm if by "on the left" you mean the scrollable panel that
links to anchors on the page.

Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJOLcceAAoJEHHMVUK0UjKVeewP/RbxlLIe30Z7wfSLwzHWpuhH
GpPDsAJhbBDzJTXkCsQBcVDuuUu4lkUCmtAgArVMdlhWEDwCTO56fuKRClCM+rkg
RSS4Pf2kObSk/cJel4SA9vAPKrbGtWpxQgVpGL2Ku5Ip8yT2KIS0KbqgFVqnVo0g
zW/3o2MNOpsoiuWbpkbSULZeFtIvQk47Y9CECtDJXl9trN0/k0+hqeHHqA00L+gM
iq0PPZCiPpIPBZLmZbC3BM529rwYIlsXVgK0Ll1R3NYhaJBjzHlqJ1ShQxjSG8TX
9PJLDAlM4drU8rrKO8Pl21AllrReRd/bKE9e+NFo2NUqzEkUJEWzOBkTFUFyIJcl
GHsqH7XtNM/IZgznt2KCCFs3RcTVBGScoa8k4TDSjghajzy70lA2tDiILakd5NCl
cRFn+IEn3lNU/fX/NB7vJ2kn1oQGs/RJZd3EnKSQ50+QM2k967DpxSOojfVhdfwO
QJey6NzXstV2vhFY4BmMQjjR2kHiTnR9IrXy8L2YNR+EeOJ+WrVOjIVXE2URXnQO
maux7y3bVQxG9HzjUvaOTwOoR/YOh3lyjQAuu0AWk1qkYBJVvr+QGUkOvm8PqrST
rxQHCKqLyT5zOZhofMwAFgvi28QNcl5QCcVAFX8OB4LELrCVnCRTL9pwf9rCi286
xIvowyrco6JLRqbpR1ry
=vt71
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Org-Mode Homepage error
       [not found]   ` <2152B3DFC552DE47A0A36CCC93D735310439FF7D@mx01.ecoplan.local>
@ 2011-07-25 20:10     ` Michael Markert
  0 siblings, 0 replies; 18+ messages in thread
From: Michael Markert @ 2011-07-25 20:10 UTC (permalink / raw)
  To: Renger van Nieuwkoop; +Cc: emacs-orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 25 Jul 2011, Renger van Nieuwkoop wrote:

> Yes, for example if I click on for example "Version 7.5" I still see
> the xhtml message from 7.6. Nothing changes.

Please CC the mailing list on followups.

The problem only with javascript. Once it's disabled all works.

Michael

> -----Original Message-----
> From: Michael Markert [mailto:markert.michael@googlemail.com] 
> Sent: Monday, July 25, 2011 9:42 PM
> To: Renger van Nieuwkoop
> Cc: emacs-orgmode@gnu.org
> Subject: Re: Org-Mode Homepage error
>
> Hi,
>
> On 25 Jul 2011, Renger van Nieuwkoop wrote:
>> Hi The hyperlinks on the left of the change page
>> (http://orgmode.org/Changes.html) do not work (Firefox and Chrome).
>
> I can't confirm if by "on the left" you mean the scrollable panel that
> links to anchors on the page.
>
> Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJOLc2mAAoJEHHMVUK0UjKVPSoQAMdZhh4VBPS0ZSMxDTTpXeO0
l/M0M4XyHOXmTHPBBngQfZrM6Dr+cp29yG76k/hBmEJRYIE9mzvJ+TdMWHul/Zdb
9f/CZ54orqpu72pFMb/3NpE8Q7E0rhdAQG+ffJFnJXHJWNBYy2vIJHtafE574Cz/
Mimsathdi2bFahevPS/DhgKnllTJI33AxQ6CvKIfaVXjPZcV6EUjRkg7kdAsYFg1
lNnoVzxJ3qAIviMwbiHu//Uw3rH97I8nfw/wf+mH8YcykpiDZW0BTYJFw6S4tnmp
C4p/ld9c2PNaoRB8SG+B24MBKH604nQ/0qu8b2drOHD1N053ZuB1+CFAUpZEs4Xd
5h38R+56hg+Emfv7pEpBIuh9s1eTxyn5bRPjQZf9Tdz3UfX08NqEk3yS7rreI/Fh
02FBsdytfiD5OZriuIxgjGLH+WFvfPA2bcoTbDQwLAnuSCwb/lE1AcMAzFc8hiEh
RDYEVkJYV0zp9I1kskji+rw2mLp8KYZdPchanhL3zU/Fwi/C4n7P8sMEyrewrhDS
vGf9/FUosIaMaSoZDURLLSMvkY14gf9UQuxObmkLtSesXTeRVKz2sN2mQKqSCebS
Cawuxr3wFVBwvkGWvKbgWEIZnf8Am3wtaWhCruWN7TtDFE+SOUPLwRHW/RHCgzcA
mJmxfz5MIN2CTg1oxP3t
=5x3h
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Org-Mode Homepage error
  2011-07-25 19:42 ` Michael Markert
       [not found]   ` <2152B3DFC552DE47A0A36CCC93D735310439FF7D@mx01.ecoplan.local>
@ 2011-07-25 20:26   ` Sebastien Vauban
  2011-07-25 20:30   ` Nick Dokos
  2 siblings, 0 replies; 18+ messages in thread
From: Sebastien Vauban @ 2011-07-25 20:26 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Renger and Michael,

Michael Markert wrote:
> On 25 Jul 2011, Renger van Nieuwkoop wrote:
>> Hi The hyperlinks on the left of the change page
>> (http://orgmode.org/Changes.html) do not work (Firefox and Chrome).
>
> I can't confirm if by "on the left" you mean the scrollable panel that links
> to anchors on the page.

I confirm that nothing happens when clicking on the links in the left sidebar
of the above mentioned page -- though my Firefox is not blocking JavaScript.

Best regards,
  Seb

-- 
Sebastien Vauban

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Org-Mode Homepage error
  2011-07-25 19:42 ` Michael Markert
       [not found]   ` <2152B3DFC552DE47A0A36CCC93D735310439FF7D@mx01.ecoplan.local>
  2011-07-25 20:26   ` Sebastien Vauban
@ 2011-07-25 20:30   ` Nick Dokos
  2011-07-25 21:29     ` Bastien
  2 siblings, 1 reply; 18+ messages in thread
From: Nick Dokos @ 2011-07-25 20:30 UTC (permalink / raw)
  To: Michael Markert
  Cc: Renger van Nieuwkoop, nicholas.dokos, emacs-orgmode@gnu.org

Michael Markert <markert.michael@googlemail.com> wrote:

> Hi,
> 
> On 25 Jul 2011, Renger van Nieuwkoop wrote:
> > Hi The hyperlinks on the left of the change page
> > (http://orgmode.org/Changes.html) do not work (Firefox and Chrome).
> 
> I can't confirm if by "on the left" you mean the scrollable panel that
> links to anchors on the page.
> 
> Michael

I see the same thing as Renger: there may be links on the left, but the
page itself seems empty except for title, date, author, org version and
the HTML validation link - in particular, no anchors.

If I look at Page Source I can see everything, so somehow the
outline-containers have become invisible for me.

I ran firebug and got this error

,----
| b.CI is null
| [Break On This Error] b.HI=(b.HI+1)%50;}b.SKIP_H=false;b.CI....[a.HI]){var b=parseInt(a.H[a.HI][0]); 
`----

on line 172 of org-info.js, but I don't know if this is real or a red
herring.

Also when the pointer hovers over e.g. "Older changes" i.e. the last
link in the scrollable list, the echo area (lower left where the link is
shown) shows:

javascript:org_html_manager.go(278)

but clicking does nothing (except pop up another instance of the above
error in the firebug console).

HTH,
Nick

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Org-Mode Homepage error
  2011-07-25 20:30   ` Nick Dokos
@ 2011-07-25 21:29     ` Bastien
  2011-07-26 12:36       ` Sebastien Vauban
  0 siblings, 1 reply; 18+ messages in thread
From: Bastien @ 2011-07-25 21:29 UTC (permalink / raw)
  To: nicholas.dokos
  Cc: Renger van Nieuwkoop, emacs-orgmode@gnu.org, Michael Markert

Hi all and Sebastian,

thanks for signaling this problem -- I fixed it on the server.

This commit creates problems when exporting using org-info.js: 

  http://orgmode.org/w/?p=org-mode.git;a=commit;h=2f1fbc58be1dc48621217d666da7bc46c3c5d84e

This is no real surprise, as the commit changes the underlying
div structure of an HTML page produced by Org...

Sebastian, what would be need to make org-info.js compatible
with both the old HTML structure and the new one, which is:

<body>
  <div id="preamble"> 
  </div>

  <div id="content">
  </div>

  <div id="postamble">
  </div>
</body>

(With the "preamble"/"content"/"postamble" strings being defined
in the variable `org-export-html-divs'.)

If that's too complicate, perhaps we can enforce another structure
for divs.

Thanks for your time!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Org-Mode Homepage error
  2011-07-25 21:29     ` Bastien
@ 2011-07-26 12:36       ` Sebastien Vauban
  2011-07-26 15:04         ` Bastien
  0 siblings, 1 reply; 18+ messages in thread
From: Sebastien Vauban @ 2011-07-26 12:36 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Bastien,

Bastien wrote:
> thanks for signaling this problem -- I fixed it on the server.
>
> This commit creates problems when exporting using org-info.js: 
>
>   http://orgmode.org/w/?p=org-mode.git;a=commit;h=2f1fbc58be1dc48621217d666da7bc46c3c5d84e
>
> This is no real surprise, as the commit changes the underlying
> div structure of an HTML page produced by Org...
>
> Sebastian, what would be need to make org-info.js compatible
> with both the old HTML structure and the new one, which is:
>
> <body>
>   <div id="preamble"> 
>   </div>
>
>   <div id="content">
>   </div>
>
>   <div id="postamble">
>   </div>
> </body>
>
> (With the "preamble"/"content"/"postamble" strings being defined
> in the variable `org-export-html-divs'.)
>
> If that's too complicate, perhaps we can enforce another structure
> for divs.

I fear this is above my current capability. I tried to understand that code
for a while, but never succeeded (in a reasonable time) to, and never could
simplify it as I wanted (to use it for my own). Of course, this is mainly due
because of my inexperience in good tools to test and debug JS, and to my lack
of knowledge of that language.

But, what did you do to fix the problem?  The current structure of the HTML
page looks good, and follows the above skeleton (except there is no preamble).
So, everything looks right to me?

Best regards,
  Seb

-- 
Sebastien Vauban

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Org-Mode Homepage error
  2011-07-26 12:36       ` Sebastien Vauban
@ 2011-07-26 15:04         ` Bastien
  2011-07-26 16:00           ` Achim Gratz
  0 siblings, 1 reply; 18+ messages in thread
From: Bastien @ 2011-07-26 15:04 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode

Hi Sébastien,

"Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> writes:

> I fear this is above my current capability. I tried to understand that code
> for a while, but never succeeded (in a reasonable time) to, and never could
> simplify it as I wanted (to use it for my own). Of course, this is mainly due
> because of my inexperience in good tools to test and debug JS, and to my lack
> of knowledge of that language.
>
> But, what did you do to fix the problem?  

Well, I re-published Worg using an older version of org.

> The current structure of the HTML page looks good, and follows the
> above skeleton (except there is no preamble).  So, everything looks
> right to me?

No.  The current HTML structure breaks compatibility with Sebastian's
tool.  As this is a severe bug, any help on finding a way to fix this
is more than welcome...

<mode lazybum>
Can you sum up how the div structure changes?

What was the structure before and what is it now?

I fail to understand why an additional <div id="preamble"> 
should break Sebastian's tool.
</mode lazybum>

Thanks :)

-- 
 Bastien

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Org-Mode Homepage error
  2011-07-26 15:04         ` Bastien
@ 2011-07-26 16:00           ` Achim Gratz
  2011-07-26 21:19             ` Sebastien Vauban
  2011-07-27 17:33             ` Bastien
  0 siblings, 2 replies; 18+ messages in thread
From: Achim Gratz @ 2011-07-26 16:00 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg@altern.org> writes:
> I fail to understand why an additional <div id="preamble"> 
> should break Sebastian's tool.
> </mode lazybum>

For starters, the title now resides in the preamble, but the script
looks for it in content.  This error is easily fixed, but I don't know
if it has further repercussions.

--8<---------------cut here---------------start------------->8---
diff --git a/code/org-info-js/org-info-src.js b/code/org-info-js/org-info-src.js
index 2e49e9c..33faaac 100644
--- a/code/org-info-js/org-info-src.js
+++ b/code/org-info-js/org-info-src.js
@@ -522,6 +522,14 @@ var org_html_manager = {
       } else { // be backward compatible
         t.BODY = document.getElementsByTagName("body")[0];
       }}
+    t.PREA = document.getElementById("preamble");
+    t.POST = document.getElementById("postamble");
+    if(null == t.PREA) {
+	t.PREA = t.BODY;
+    }
+    if(null == t.POST) {
+	t.POST = t.BODY;
+    }
     if(! t.WINDOW) {
       t.WINDOW = document.createElement("div");
       t.WINDOW.style.marginBottom = "40px";
@@ -738,7 +746,7 @@ var org_html_manager = {
 
     // Move the title into the first visible section.
     // TODO: show title above everything if FIXED_TOC !!!
-    t.TITLE = t.BODY.getElementsByTagName("h1")[0];
+      t.TITLE = t.PREA.getElementsByTagName("h1")[0];
     if(t.INNER_TITLE && !t.FIXED_TOC && t.VIEW != t.SLIDE_VIEW) {
       t.INNER_TITLE = t.TITLE.cloneNode(true);
       /* TODO: this is still based on wrong behaviour of browsers (same id for two elements)
--8<---------------cut here---------------end--------------->8---



Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: Org-Mode Homepage error
  2011-07-26 16:00           ` Achim Gratz
@ 2011-07-26 21:19             ` Sebastien Vauban
  2011-07-27 17:33             ` Bastien
  1 sibling, 0 replies; 18+ messages in thread
From: Sebastien Vauban @ 2011-07-26 21:19 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Achim and Bastien,

Achim Gratz wrote:
> Bastien <bzg-whniv8GeeGkdnm+yROfE0A@public.gmane.org> writes:
>> I fail to understand why an additional <div id="preamble">
>> should break Sebastian's tool.
>> </mode lazybum>
>
> For starters, the title now resides in the preamble, but the script
> looks for it in content.

Good catch!

FYI, the title has always been in the preamble. See lines 354--381 in
org-html.el:

#+begin_src emacs-lisp
(defcustom org-export-html-preamble t
  "Non-nil means insert a preamble in HTML export.

When `t', insert a string as defined by one of the formatting
strings in `org-export-html-preamble-format'.  When set to a
string, this string overrides `org-export-html-preamble-format'.
When set to a function, apply this function and insert the
returned string.  The function takes the property list of export
options as its only argument.

Setting :html-preamble in publishing projects will take
precedence over this variable."
  :group 'org-export-html
  :type '(choice (const :tag "No preamble" nil)
		 (const :tag "Default preamble" t)
		 (string :tag "Custom formatting string")
		 (function :tag "Function (must return a string)")))

(defcustom org-export-html-preamble-format
  '(("en" "<h1 class=\"title\">%t</h1>"))
  "The format for the HTML preamble.

%t stands for the title.

If you need to use a \"%\" character, you need to escape it
like that: \"%%\"."
  :group 'org-export-html
  :type 'string)
#+end_src

The difference I introduced is that -- when present -- the preamble (whatever
its contents) is wrapped inside a "preamble" DIV.

I did not change the fact that the title was part of the preamble.

Though, we can wonder if it makes sense to put the title as part of the
preamble. But I guess there is a good reason for it(TM).

Best regards,
  Seb

-- 
Sebastien Vauban

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Org-Mode Homepage error
  2011-07-26 16:00           ` Achim Gratz
  2011-07-26 21:19             ` Sebastien Vauban
@ 2011-07-27 17:33             ` Bastien
  2011-07-28 18:49               ` Achim Gratz
  2011-07-31 17:42               ` Achim Gratz
  1 sibling, 2 replies; 18+ messages in thread
From: Bastien @ 2011-07-27 17:33 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Hi Achim and Sebastian,

Achim Gratz <Stromeko@nexgo.de> writes:

> Bastien <bzg@altern.org> writes:
>> I fail to understand why an additional <div id="preamble"> 
>> should break Sebastian's tool.
>> </mode lazybum>
>
> For starters, the title now resides in the preamble, but the script
> looks for it in content.  This error is easily fixed, but I don't know
> if it has further repercussions.

Mhh...  I tried to patch org-info-src.js with this fix, to recompile 
it (and get org-info.js).  I copied the result here:

  http://orgmode.org/org-info2.js 

Then setting this path in `org-infojs-options', I tried various ways 
of getting a working HTML file, with the new div structure, but with 
no good result.

I have taken the simplest road for now: I've put the title back in the
"content" div and removed it from the default preamble -- although you
can still add it in the preamble.

I think it's better since it doesn't break people's configuration when
using org-info.js.

For such changes about the HTML structure, I need to better sync with
Sebastian to see how org-info.js can be updated and/or more flexible.
For example "content" is hardcoded in org-info.js and is not anymore 
in org-html.el, so this might lead to troubles.

Thanks for your input so far,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Org-Mode Homepage error
  2011-07-27 17:33             ` Bastien
@ 2011-07-28 18:49               ` Achim Gratz
  2011-07-31 17:42               ` Achim Gratz
  1 sibling, 0 replies; 18+ messages in thread
From: Achim Gratz @ 2011-07-28 18:49 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg@altern.org> writes:
> Mhh...  I tried to patch org-info-src.js with this fix, to recompile 
> it (and get org-info.js).  I copied the result here:
>
>   http://orgmode.org/org-info2.js 
>
> Then setting this path in `org-infojs-options', I tried various ways 
> of getting a working HTML file, with the new div structure, but with 
> no good result.

I didn't have time to check if the change survives the minify script and
was out the last two days.  The unminified version did work on the Worg
writeup from Sebastian Rose.  Since he appears not to have responded to
this thread so far I'll try to check what the issue with the minified
version might be.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Org-Mode Homepage error
  2011-07-27 17:33             ` Bastien
  2011-07-28 18:49               ` Achim Gratz
@ 2011-07-31 17:42               ` Achim Gratz
  2011-08-16 20:10                 ` Bastien
  1 sibling, 1 reply; 18+ messages in thread
From: Achim Gratz @ 2011-07-31 17:42 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg@altern.org> writes:
> Mhh...  I tried to patch org-info-src.js with this fix, to recompile 
> it (and get org-info.js).  I copied the result here:
>
>   http://orgmode.org/org-info2.js 

That is the same file I have produced myself now.

> Then setting this path in `org-infojs-options', I tried various ways 
> of getting a working HTML file, with the new div structure, but with 
> no good result.

Could you be more specific what is a "no good result"?  I've been
generating the index.html in org-info-js and it now works without error
for me.  I've even found a simpler patch that is based on the class
of the title heading so that it is found regardless of its position in
preamble or content:

--8<---------------cut here---------------start------------->8---
Diff --git a/code/org-info-js/org-info-src.js b/code/org-info-js/org-info-src.js
index 2e49e9c..b521c50 100644
--- a/code/org-info-js/org-info-src.js
+++ b/code/org-info-js/org-info-src.js
@@ -738,7 +738,7 @@ var org_html_manager = {
 
     // Move the title into the first visible section.
     // TODO: show title above everything if FIXED_TOC !!!
-    t.TITLE = t.BODY.getElementsByTagName("h1")[0];
+    t.TITLE = document.getElementsByClassName("title")[0];
     if(t.INNER_TITLE && !t.FIXED_TOC && t.VIEW != t.SLIDE_VIEW) {
       t.INNER_TITLE = t.TITLE.cloneNode(true);
       /* TODO: this is still based on wrong behaviour of browsers (same id for two elements)
--8<---------------cut here---------------end--------------->8---

It seems that there may be an implicit assumption that the title is in
the same DIV as the content.  This seems to work OK in FF5 and
Konqueror 4.6.5 (WebKit), however it may break in other browsers.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf Blofeld V1.15B11:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: Org-Mode Homepage error
  2011-07-31 17:42               ` Achim Gratz
@ 2011-08-16 20:10                 ` Bastien
  2011-08-17 15:58                   ` Achim Gratz
  0 siblings, 1 reply; 18+ messages in thread
From: Bastien @ 2011-08-16 20:10 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Hi Achim,

CC'ing Sebastian in case he can have a look.

Achim Gratz <Stromeko@nexgo.de> writes:

> Could you be more specific what is a "no good result"?  

Well, the HTML page was empty -- same error than with the unpatched
version of org-info.js.

> I've been
> generating the index.html in org-info-js and it now works without error
> for me.  I've even found a simpler patch that is based on the class
> of the title heading so that it is found regardless of its position in
> preamble or content:
>
> Diff --git a/code/org-info-js/org-info-src.js b/code/org-info-js/org-info-src.js
> index 2e49e9c..b521c50 100644
> --- a/code/org-info-js/org-info-src.js
> +++ b/code/org-info-js/org-info-src.js
> @@ -738,7 +738,7 @@ var org_html_manager = {
>  
>      // Move the title into the first visible section.
>      // TODO: show title above everything if FIXED_TOC !!!
> -    t.TITLE = t.BODY.getElementsByTagName("h1")[0];
> +    t.TITLE = document.getElementsByClassName("title")[0];
>      if(t.INNER_TITLE && !t.FIXED_TOC && t.VIEW != t.SLIDE_VIEW) {
>        t.INNER_TITLE = t.TITLE.cloneNode(true);
>        /* TODO: this is still based on wrong behaviour of browsers (same id for two elements)

If you're confident this works with this structure:

  <div id="preamble">
    <h1 class="title">Title</h1>
  <div>
  
  <div id="content">
  ...
  <div>

then I will apply the patch (with a ChangeLog!)

Thanks,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Org-Mode Homepage error
  2011-08-16 20:10                 ` Bastien
@ 2011-08-17 15:58                   ` Achim Gratz
  2011-08-17 16:18                     ` Bastien
  0 siblings, 1 reply; 18+ messages in thread
From: Achim Gratz @ 2011-08-17 15:58 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 772 bytes --]

Bastien <bzg@altern.org> writes:
> Well, the HTML page was empty -- same error than with the unpatched
> version of org-info.js.

Fetching a stale copy from cache perhaps?  I did all my testing locally
and changed things around to make sure it would really load the version
I just created...

> If you're confident this works with this structure:
>
>   <div id="preamble">
>     <h1 class="title">Title</h1>
>   <div>
>   
>   <div id="content">
>   ...
>   <div>
>
> then I will apply the patch (with a ChangeLog!)

That works for me in Firefox6 and Konqueror (both KHTML and WebKit mode)
in both the minified and the source version.  I've used the latest
version of yuicompressor (2.4.6 instead of 2.4.2), but that should not
make a difference.  Proper patch attached.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Find-title-differently-to-allow-it-to-reside-in-prea.patch --]
[-- Type: text/x-patch, Size: 1155 bytes --]

From 55fd3d1b7f82460e28d8fcc50c6ea0eb41197fef Mon Sep 17 00:00:00 2001
From: Achim Gratz <Stromeko@Stromeko.DE>
Date: Wed, 17 Aug 2011 17:49:56 +0200
Subject: [PATCH] Find title differently to allow it to reside in preamble

  * org-info-src.js: find the title heading via it's class property instead of
    relying on it to be the first heading in div content

TINYCHANGE
---
 code/org-info-js/org-info-src.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/code/org-info-js/org-info-src.js b/code/org-info-js/org-info-src.js
index 2e49e9c..b521c50 100644
--- a/code/org-info-js/org-info-src.js
+++ b/code/org-info-js/org-info-src.js
@@ -738,7 +738,7 @@ var org_html_manager = {
 
     // Move the title into the first visible section.
     // TODO: show title above everything if FIXED_TOC !!!
-    t.TITLE = t.BODY.getElementsByTagName("h1")[0];
+    t.TITLE = document.getElementsByClassName("title")[0];
     if(t.INNER_TITLE && !t.FIXED_TOC && t.VIEW != t.SLIDE_VIEW) {
       t.INNER_TITLE = t.TITLE.cloneNode(true);
       /* TODO: this is still based on wrong behaviour of browsers (same id for two elements)
-- 
1.7.6


[-- Attachment #3: Type: text/plain, Size: 183 bytes --]



Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: Org-Mode Homepage error
  2011-08-17 15:58                   ` Achim Gratz
@ 2011-08-17 16:18                     ` Bastien
  2011-08-17 16:50                       ` Achim Gratz
  0 siblings, 1 reply; 18+ messages in thread
From: Bastien @ 2011-08-17 16:18 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Hi Achim,

Achim Gratz <Stromeko@nexgo.de> writes:

> Fetching a stale copy from cache perhaps?  

Ah, yes, perhaps.

>From 55fd3d1b7f82460e28d8fcc50c6ea0eb41197fef Mon Sep 17 00:00:00 2001
> From: Achim Gratz <Stromeko@Stromeko.DE>
> Date: Wed, 17 Aug 2011 17:49:56 +0200
> Subject: [PATCH] Find title differently to allow it to reside in preamble
>
>   * org-info-src.js: find the title heading via it's class property instead of
>     relying on it to be the first heading in div content

Thanks for this -- it does not apply, though.  Make sure you
pulled the lastest version of Worg, see commit cd473c26:

  cd473c26 * Test update of org-infojs

This was a test I did.  Since the version of org-info-js in Worg is
*not* the version on http://orgmode.org/ changes here do not affect
org-info-js users.

Let me know,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Org-Mode Homepage error
  2011-08-17 16:18                     ` Bastien
@ 2011-08-17 16:50                       ` Achim Gratz
  2011-08-18  7:02                         ` Bastien
  0 siblings, 1 reply; 18+ messages in thread
From: Achim Gratz @ 2011-08-17 16:50 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 385 bytes --]

Bastien <bzg@altern.org> writes:
> Thanks for this -- it does not apply, though.  Make sure you
> pulled the lastest version of Worg, see commit cd473c26:
>
>   cd473c26 * Test update of org-infojs
>
> This was a test I did.  Since the version of org-info-js in Worg is
> *not* the version on http://orgmode.org/ changes here do not affect
> org-info-js users.

Here's the new patch.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Find-title-differently-to-allow-it-to-reside-in-prea.patch --]
[-- Type: text/x-patch, Size: 1157 bytes --]

From 2c962fc8edbec789c7e259d0a334601638755463 Mon Sep 17 00:00:00 2001
From: Achim Gratz <Stromeko@Stromeko.DE>
Date: Wed, 17 Aug 2011 17:49:56 +0200
Subject: [PATCH] Find title differently to allow it to reside in preamble

  * org-info-src.js: find the title heading via it's class property instead of
    relying on it to be the first heading in div content

TINYCHANGE
---
 code/org-info-js/org-info-src.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/code/org-info-js/org-info-src.js b/code/org-info-js/org-info-src.js
index 33faaac..59833f8 100644
--- a/code/org-info-js/org-info-src.js
+++ b/code/org-info-js/org-info-src.js
@@ -746,7 +746,7 @@ var org_html_manager = {
 
     // Move the title into the first visible section.
     // TODO: show title above everything if FIXED_TOC !!!
-      t.TITLE = t.PREA.getElementsByTagName("h1")[0];
+    t.TITLE = document.getElementsByClassName("title")[0];
     if(t.INNER_TITLE && !t.FIXED_TOC && t.VIEW != t.SLIDE_VIEW) {
       t.INNER_TITLE = t.TITLE.cloneNode(true);
       /* TODO: this is still based on wrong behaviour of browsers (same id for two elements)
-- 
1.7.6


[-- Attachment #3: Type: text/plain, Size: 199 bytes --]



Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: Org-Mode Homepage error
  2011-08-17 16:50                       ` Achim Gratz
@ 2011-08-18  7:02                         ` Bastien
  0 siblings, 0 replies; 18+ messages in thread
From: Bastien @ 2011-08-18  7:02 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Achim Gratz <Stromeko@nexgo.de> writes:

> Here's the new patch.

Applied, thanks!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2011-08-18  7:01 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-25 19:33 Org-Mode Homepage error Renger van Nieuwkoop
2011-07-25 19:42 ` Michael Markert
     [not found]   ` <2152B3DFC552DE47A0A36CCC93D735310439FF7D@mx01.ecoplan.local>
2011-07-25 20:10     ` Michael Markert
2011-07-25 20:26   ` Sebastien Vauban
2011-07-25 20:30   ` Nick Dokos
2011-07-25 21:29     ` Bastien
2011-07-26 12:36       ` Sebastien Vauban
2011-07-26 15:04         ` Bastien
2011-07-26 16:00           ` Achim Gratz
2011-07-26 21:19             ` Sebastien Vauban
2011-07-27 17:33             ` Bastien
2011-07-28 18:49               ` Achim Gratz
2011-07-31 17:42               ` Achim Gratz
2011-08-16 20:10                 ` Bastien
2011-08-17 15:58                   ` Achim Gratz
2011-08-17 16:18                     ` Bastien
2011-08-17 16:50                       ` Achim Gratz
2011-08-18  7:02                         ` Bastien

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.