emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Problem with org-info.js?
@ 2009-06-25 18:56 Xin Shi
  2009-06-25 21:26 ` Sebastian Rose
  0 siblings, 1 reply; 10+ messages in thread
From: Xin Shi @ 2009-06-25 18:56 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 932 bytes --]

Hello Experts,

I'm using org-6.28b and the fresh org-info.js (a few minutes ago). I publish
org file into HTML with #+INFOJS_OPT: view:info. Just like this page:
http://orgmode.org/Changes.html

However, the internal links (such as [[#tag-name]]) still does not work.
When I hover the courser on the link, I can see it is correct. Somehow, the
javascript just does not follow the link. Put it another way, once get into
that page, all of the movement for the internal links are governed by
javascript only, only links like javascript:org_html_manager.go(12) works. I
don't know if it's possible to fix it.

For example, in the same page:
http://orgmode.org/Changes.html

although it already have "customed_id"s, such as #v6.27, when you click on
the Version 6.27, the real link get you to there is
javascript:org_html_manager.go(29). If one put a link on that page:
[[#v6.27][Go to Version 6.27]], it might not work.

Thanks!

Xin

[-- Attachment #1.2: Type: text/html, Size: 1105 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Problem with org-info.js?
  2009-06-25 18:56 Problem with org-info.js? Xin Shi
@ 2009-06-25 21:26 ` Sebastian Rose
  2009-06-26 21:14   ` Xin Shi
  0 siblings, 1 reply; 10+ messages in thread
From: Sebastian Rose @ 2009-06-25 21:26 UTC (permalink / raw)
  To: Xin Shi; +Cc: emacs-orgmode

Xin Shi <shixin111@gmail.com> writes:
> Hello Experts,
>
> I'm using org-6.28b and the fresh org-info.js (a few minutes ago). I publish
> org file into HTML with #+INFOJS_OPT: view:info. Just like this page:
> http://orgmode.org/Changes.html
>
> However, the internal links (such as [[#tag-name]]) still does not
> work.

Here it does. I wonder if we could finally help you, if you submitted a
simple test file that reproduces the problem.


As I wrote before, I can use custom IDs in the several documented ways
and they all work for me. Please send a test file so we have a chance to
find out where the problem is. I fear without a chance to reproduce the error,
we can not be of great help.


> When I hover the courser on the link, I can see it is correct. Somehow, the
> javascript just does not follow the link. Put it another way, once get into
> that page, all of the movement for the internal links are governed by
> javascript only, only links like javascript:org_html_manager.go(12) works. I
> don't know if it's possible to fix it.


No. Not in info view. The info-view mode (and folding in plain view) is
done by hiding the other sections. To show a section, the script has to
show it again.


> For example, in the same page:
> http://orgmode.org/Changes.html
>
> although it already have "customed_id"s, such as #v6.27, when you click on
> the Version 6.27, the real link get you to there is
> javascript:org_html_manager.go(29). If one put a link on that page:
> [[#v6.27][Go to Version 6.27]], it might not work.

There is a script like that on the page, but the script changes all
those links to ensure that the script gets noticed if the link is
used. How else should the script show and hide sections as needed??

To see that, just click on the [[#v6.27][Go to Version 6.27]] and then
press `U'. Do you see the URL in the link the script shows on top of the
screen? 

It looks like this:

   http://orgmode.org/Changes.html#v6.27

If you now click this link, you will come to that exact section.



   Sebastian

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

* Re: Problem with org-info.js?
  2009-06-25 21:26 ` Sebastian Rose
@ 2009-06-26 21:14   ` Xin Shi
  2009-06-26 23:07     ` Sebastian Rose
  2009-06-26 23:21     ` Sebastian Rose
  0 siblings, 2 replies; 10+ messages in thread
From: Xin Shi @ 2009-06-26 21:14 UTC (permalink / raw)
  To: Sebastian Rose; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 2405 bytes --]

Hi Sebastian,

I've attached a  simple test org (a.org), please check it it works for you.

My environment does not work:

Emacs: 22.3.1
Org-mode: 6.28b
Firefox: 3.0.11

Thanks!

Xin

On Thu, Jun 25, 2009 at 5:26 PM, Sebastian Rose <sebastian_rose@gmx.de>wrote:

> Xin Shi <shixin111@gmail.com> writes:
> > Hello Experts,
> >
> > I'm using org-6.28b and the fresh org-info.js (a few minutes ago). I
> publish
> > org file into HTML with #+INFOJS_OPT: view:info. Just like this page:
> > http://orgmode.org/Changes.html
> >
> > However, the internal links (such as [[#tag-name]]) still does not
> > work.
>
> Here it does. I wonder if we could finally help you, if you submitted a
> simple test file that reproduces the problem.
>
>
> As I wrote before, I can use custom IDs in the several documented ways
> and they all work for me. Please send a test file so we have a chance to
> find out where the problem is. I fear without a chance to reproduce the
> error,
> we can not be of great help.
>
>
> > When I hover the courser on the link, I can see it is correct. Somehow,
> the
> > javascript just does not follow the link. Put it another way, once get
> into
> > that page, all of the movement for the internal links are governed by
> > javascript only, only links like javascript:org_html_manager.go(12)
> works. I
> > don't know if it's possible to fix it.
>
>
> No. Not in info view. The info-view mode (and folding in plain view) is
> done by hiding the other sections. To show a section, the script has to
> show it again.
>
>
> > For example, in the same page:
> > http://orgmode.org/Changes.html
> >
> > although it already have "customed_id"s, such as #v6.27, when you click
> on
> > the Version 6.27, the real link get you to there is
> > javascript:org_html_manager.go(29). If one put a link on that page:
> > [[#v6.27][Go to Version 6.27]], it might not work.
>
> There is a script like that on the page, but the script changes all
> those links to ensure that the script gets noticed if the link is
> used. How else should the script show and hide sections as needed??
>
> To see that, just click on the [[#v6.27][Go to Version 6.27]] and then
> press `U'. Do you see the URL in the link the script shows on top of the
> screen?
>
> It looks like this:
>
>   http://orgmode.org/Changes.html#v6.27
>
> If you now click this link, you will come to that exact section.
>
>
>
>   Sebastian
>
>

[-- Attachment #1.2: Type: text/html, Size: 3338 bytes --]

[-- Attachment #2: a.org --]
[-- Type: application/octet-stream, Size: 553 bytes --]

#+STARTUP: hidestars 
#+STYLE: <link rel="stylesheet" type="text/css" href="web/main.css" />
#+INFOJS_OPT: view:info path:web/org-info.js tdepth:1 ftoc:t 
#+OPTIONS: author:nil creator:nil num:nil toc:nil todo:nil
#+LINK_UP: ./

* Overview

 - This is an internal link to [[#tab-compare_yields_signal_7.06_regular1][table]]


* Tables

** Only New DNtuple - regular1
*** Compare yields signal 7.06 regular1
    :PROPERTIES:
    :CUSTOM_ID: tab-compare_yields_signal_7.06_regular1
    :END:
    
    : dhad table compare yields signal 7.06 regular1
    

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

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Problem with org-info.js?
  2009-06-26 21:14   ` Xin Shi
@ 2009-06-26 23:07     ` Sebastian Rose
  2009-06-26 23:21     ` Sebastian Rose
  1 sibling, 0 replies; 10+ messages in thread
From: Sebastian Rose @ 2009-06-26 23:07 UTC (permalink / raw)
  To: Xin Shi; +Cc: emacs-orgmode

Xin Shi <shixin111@gmail.com> writes:
> Hi Sebastian,
>
> I've attached a  simple test org (a.org), please check it it works for you.

Yepp - works _not_.


Funny enough, the link in the TOC works.
Problem seems to be a link nested inside a list...


Thanks, I'll go and check.


Best regards


   Sebastian

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

* Re: Problem with org-info.js?
  2009-06-26 21:14   ` Xin Shi
  2009-06-26 23:07     ` Sebastian Rose
@ 2009-06-26 23:21     ` Sebastian Rose
  2009-06-27 19:45       ` Xin Shi
  1 sibling, 1 reply; 10+ messages in thread
From: Sebastian Rose @ 2009-06-26 23:21 UTC (permalink / raw)
  To: Xin Shi; +Cc: emacs-orgmode

Xin Shi <shixin111@gmail.com> writes:
> Hi Sebastian,
>
> I've attached a  simple test org (a.org), please check it it works for you.


OK. Seems fixed now.

Here is the link to the commit:

http://repo.or.cz/w/Worg.git?a=commit;h=ddc3cf413702914a2c1a1f1fac063d4e4e367b6c



Thanks again for sending the test file (i.e. locating the bug).



Best wishes


    Sebastian

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

* Re: Problem with org-info.js?
  2009-06-26 23:21     ` Sebastian Rose
@ 2009-06-27 19:45       ` Xin Shi
  2009-06-27 21:49         ` Sebastian Rose
  0 siblings, 1 reply; 10+ messages in thread
From: Xin Shi @ 2009-06-27 19:45 UTC (permalink / raw)
  To: Sebastian Rose; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 618 bytes --]

Hi Sebastian,

Thanks for your quick fix.

Just curious, what was the problem before?

Shall I just download the new js file?

Xin

On Fri, Jun 26, 2009 at 7:21 PM, Sebastian Rose <sebastian_rose@gmx.de>wrote:

> Xin Shi <shixin111@gmail.com> writes:
> > Hi Sebastian,
> >
> > I've attached a  simple test org (a.org), please check it it works for
> you.
>
>
> OK. Seems fixed now.
>
> Here is the link to the commit:
>
>
> http://repo.or.cz/w/Worg.git?a=commit;h=ddc3cf413702914a2c1a1f1fac063d4e4e367b6c
>
>
>
> Thanks again for sending the test file (i.e. locating the bug).
>
>
>
> Best wishes
>
>
>    Sebastian
>

[-- Attachment #1.2: Type: text/html, Size: 1272 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Problem with org-info.js?
  2009-06-27 19:45       ` Xin Shi
@ 2009-06-27 21:49         ` Sebastian Rose
  2009-06-28  1:03           ` Xin Shi
  0 siblings, 1 reply; 10+ messages in thread
From: Sebastian Rose @ 2009-06-27 21:49 UTC (permalink / raw)
  To: Xin Shi; +Cc: emacs-orgmode

Xin Shi <shixin111@gmail.com> writes:
> Hi Sebastian,
>
> Thanks for your quick fix.
>
> Just curious, what was the problem before?


getElementsByTagName() is not recursive when called on certain HTML
elements. I had to use `document.getElementsByTagName("a");' instead to
catch links inside list elements. Before I did that for each sections
block level elements (the headline and the <div id="text-sec-2.2"...>).

I wonder how no one noticed that for such a long time :) links in a list
is not too strange...



> Shall I just download the new js file?

Yes. Nothing else has changed, just added that fix.

It looks as if some more stuff has changed sometimes, because I minify
the script. That leads to bigger chunks if you diff it. The diff of the
org-info-src.js file shows what has actually changed.


Best wishes

   Sebastian

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

* Re: Problem with org-info.js?
  2009-06-27 21:49         ` Sebastian Rose
@ 2009-06-28  1:03           ` Xin Shi
  2009-06-28  3:37             ` Sebastian Rose
  0 siblings, 1 reply; 10+ messages in thread
From: Xin Shi @ 2009-06-28  1:03 UTC (permalink / raw)
  To: Sebastian Rose; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1375 bytes --]

Hi Sebastian,

Thanks for the explanation! I guess one reason for me to spot that is I use
org to publish all my working notes into HTML and use it on our group
meetings all the time :)

By the way, for the org-info-src.js and org-info.js, is the "white spaces"
only difference between them? We can probly keep the version number in the
org-info.js, so that people are easier to follow.

Thanks again!

Xin




On Sat, Jun 27, 2009 at 5:49 PM, Sebastian Rose <sebastian_rose@gmx.de>wrote:

> Xin Shi <shixin111@gmail.com> writes:
> > Hi Sebastian,
> >
> > Thanks for your quick fix.
> >
> > Just curious, what was the problem before?
>
>
> getElementsByTagName() is not recursive when called on certain HTML
> elements. I had to use `document.getElementsByTagName("a");' instead to
> catch links inside list elements. Before I did that for each sections
> block level elements (the headline and the <div id="text-sec-2.2"...>).
>
> I wonder how no one noticed that for such a long time :) links in a list
> is not too strange...
>
>
>
> > Shall I just download the new js file?
>
> Yes. Nothing else has changed, just added that fix.
>
> It looks as if some more stuff has changed sometimes, because I minify
> the script. That leads to bigger chunks if you diff it. The diff of the
> org-info-src.js file shows what has actually changed.
>
>
> Best wishes
>
>   Sebastian
>

[-- Attachment #1.2: Type: text/html, Size: 1977 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Problem with org-info.js?
  2009-06-28  1:03           ` Xin Shi
@ 2009-06-28  3:37             ` Sebastian Rose
  2009-06-28 15:08               ` Xin Shi
  0 siblings, 1 reply; 10+ messages in thread
From: Sebastian Rose @ 2009-06-28  3:37 UTC (permalink / raw)
  To: Xin Shi; +Cc: emacs-orgmode

Xin Shi <shixin111@gmail.com> writes:
> Hi Sebastian,
>
> Thanks for the explanation! I guess one reason for me to spot that is I use
> org to publish all my working notes into HTML and use it on our group
> meetings all the time :)
>
> By the way, for the org-info-src.js and org-info.js, is the "white spaces"
> only difference between them? We can probly keep the version number in the
> org-info.js, so that people are easier to follow.

No. The yuicompressor (http://developer.yahoo.com/yui/compressor/) has
no option to keep comments intact - at least I couldn't fine one.

But from now on (since the one I pushed 20 seconds ago), the version
number is always visible below the table of shortcuts (`?' or click the
`HELP' link).


   Sebastian

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

* Re: Problem with org-info.js?
  2009-06-28  3:37             ` Sebastian Rose
@ 2009-06-28 15:08               ` Xin Shi
  0 siblings, 0 replies; 10+ messages in thread
From: Xin Shi @ 2009-06-28 15:08 UTC (permalink / raw)
  To: Sebastian Rose; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 959 bytes --]

Hi Sebastian,

I can see the version now:  org-info.js, v. 0.1.1.8 :)

Thanks!

Xin


On Sat, Jun 27, 2009 at 11:37 PM, Sebastian Rose <sebastian_rose@gmx.de>wrote:

> Xin Shi <shixin111@gmail.com> writes:
> > Hi Sebastian,
> >
> > Thanks for the explanation! I guess one reason for me to spot that is I
> use
> > org to publish all my working notes into HTML and use it on our group
> > meetings all the time :)
> >
> > By the way, for the org-info-src.js and org-info.js, is the "white
> spaces"
> > only difference between them? We can probly keep the version number in
> the
> > org-info.js, so that people are easier to follow.
>
> No. The yuicompressor (http://developer.yahoo.com/yui/compressor/) has
> no option to keep comments intact - at least I couldn't fine one.
>
> But from now on (since the one I pushed 20 seconds ago), the version
> number is always visible below the table of shortcuts (`?' or click the
> `HELP' link).
>
>
>   Sebastian
>

[-- Attachment #1.2: Type: text/html, Size: 1558 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2009-06-28 15:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-25 18:56 Problem with org-info.js? Xin Shi
2009-06-25 21:26 ` Sebastian Rose
2009-06-26 21:14   ` Xin Shi
2009-06-26 23:07     ` Sebastian Rose
2009-06-26 23:21     ` Sebastian Rose
2009-06-27 19:45       ` Xin Shi
2009-06-27 21:49         ` Sebastian Rose
2009-06-28  1:03           ` Xin Shi
2009-06-28  3:37             ` Sebastian Rose
2009-06-28 15:08               ` Xin Shi

Code repositories for project(s) associated with this 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).