emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Show Org source] button does not work
@ 2016-01-13  0:09 Kynn Jones
  2016-01-13  5:08 ` Nick Dokos
  0 siblings, 1 reply; 4+ messages in thread
From: Kynn Jones @ 2016-01-13  0:09 UTC (permalink / raw)
  To: emacs-orgmode

The [Show Org source] button at the bottom of pages such as

http://orgmode.org/worg/

does not work.  Nothing happens when one clicks on it.  It's supposed
to execute the statement `show_org_source()`, but as far as I can
tell, the function `show_org_source` is not to be found in the page's
JS.

I've tried this in multiple browsers and OSS.

Best,

kj

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

* Re: [Show Org source] button does not work
  2016-01-13  0:09 [Show Org source] button does not work Kynn Jones
@ 2016-01-13  5:08 ` Nick Dokos
  2016-01-13  8:33   ` Marco Wahl
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Dokos @ 2016-01-13  5:08 UTC (permalink / raw)
  To: emacs-orgmode

Kynn Jones <kynnjo@gmail.com> writes:

> The [Show Org source] button at the bottom of pages such as
>
> http://orgmode.org/worg/
>
> does not work.  Nothing happens when one clicks on it.  It's supposed
> to execute the statement `show_org_source()`, but as far as I can
> tell, the function `show_org_source` is not to be found in the page's
> JS.
>

I can see the following (lines 63-79 of the page source):

<script type="text/javascript">
    function rpl(expr,a,b) {
      var i=0
      while (i!=-1) {
         i=expr.indexOf(a,i);
         if (i>=0) {
            expr=expr.substring(0,i)+b+expr.substring(i+a.length);
            i+=b.length;
         }
      }
      return expr
    }

    function show_org_source(){
       document.location.href = rpl(document.location.href,"html","org.html");
    }
</script>


Try clicking the button on the following page:

   http://orgmode.org/worg/org-tutorials/org-outside-org.html

It changes the location to

   http://orgmode.org/worg/org-tutorials/org-outside-org.org.html

and loads it.

http://orgmode.org/worg/ does not have a .html suffix so the rpl()
function leaves it alone.

This is with FF 43.0.3 on Fedora 22.

-- 
Nick

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

* Re: [Show Org source] button does not work
  2016-01-13  5:08 ` Nick Dokos
@ 2016-01-13  8:33   ` Marco Wahl
  2016-01-13 16:11     ` Kynn Jones
  0 siblings, 1 reply; 4+ messages in thread
From: Marco Wahl @ 2016-01-13  8:33 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <ndokos@gmail.com> writes:

> Kynn Jones <kynnjo@gmail.com> writes:
>
>> The [Show Org source] button at the bottom of pages such as
>>
>> http://orgmode.org/worg/
>>
>> does not work.  Nothing happens when one clicks on it.  It's supposed
>> to execute the statement `show_org_source()`, but as far as I can
>> tell, the function `show_org_source` is not to be found in the page's
>> JS.
>>
>
> I can see the following (lines 63-79 of the page source):
>
> <script type="text/javascript">
>     function rpl(expr,a,b) {
>       var i=0
>       while (i!=-1) {
>          i=expr.indexOf(a,i);
>          if (i>=0) {
>             expr=expr.substring(0,i)+b+expr.substring(i+a.length);
>             i+=b.length;
>          }
>       }
>       return expr
>     }
>
>     function show_org_source(){
>        document.location.href = rpl(document.location.href,"html","org.html");
>     }
> </script>
>
>
> Try clicking the button on the following page:
>
>    http://orgmode.org/worg/org-tutorials/org-outside-org.html
>
> It changes the location to
>
>    http://orgmode.org/worg/org-tutorials/org-outside-org.org.html
>
> and loads it.
>
> http://orgmode.org/worg/ does not have a .html suffix so the rpl()
> function leaves it alone.
>
> This is with FF 43.0.3 on Fedora 22.

The desired behaviour of the [Show Org source] button for
http://orgmode.org/worg/ can be found at
http://orgmode.org/worg/index.html.


My 2 ct,
-- 
Marco Wahl
GPG: 0x49010A040A3AE6F2

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

* Re: [Show Org source] button does not work
  2016-01-13  8:33   ` Marco Wahl
@ 2016-01-13 16:11     ` Kynn Jones
  0 siblings, 0 replies; 4+ messages in thread
From: Kynn Jones @ 2016-01-13 16:11 UTC (permalink / raw)
  To: Marco Wahl; +Cc: emacs-orgmode

OK, now it's working.  I'm not sure what the problem was before, but
it seems resolved now.

Sorry for the false alarm.

Thanks,

G

On Wed, Jan 13, 2016 at 3:33 AM, Marco Wahl <marcowahlsoft@gmail.com> wrote:
> Nick Dokos <ndokos@gmail.com> writes:
>
>> Kynn Jones <kynnjo@gmail.com> writes:
>>
>>> The [Show Org source] button at the bottom of pages such as
>>>
>>> http://orgmode.org/worg/
>>>
>>> does not work.  Nothing happens when one clicks on it.  It's supposed
>>> to execute the statement `show_org_source()`, but as far as I can
>>> tell, the function `show_org_source` is not to be found in the page's
>>> JS.
>>>
>>
>> I can see the following (lines 63-79 of the page source):
>>
>> <script type="text/javascript">
>>     function rpl(expr,a,b) {
>>       var i=0
>>       while (i!=-1) {
>>          i=expr.indexOf(a,i);
>>          if (i>=0) {
>>             expr=expr.substring(0,i)+b+expr.substring(i+a.length);
>>             i+=b.length;
>>          }
>>       }
>>       return expr
>>     }
>>
>>     function show_org_source(){
>>        document.location.href = rpl(document.location.href,"html","org.html");
>>     }
>> </script>
>>
>>
>> Try clicking the button on the following page:
>>
>>    http://orgmode.org/worg/org-tutorials/org-outside-org.html
>>
>> It changes the location to
>>
>>    http://orgmode.org/worg/org-tutorials/org-outside-org.org.html
>>
>> and loads it.
>>
>> http://orgmode.org/worg/ does not have a .html suffix so the rpl()
>> function leaves it alone.
>>
>> This is with FF 43.0.3 on Fedora 22.
>
> The desired behaviour of the [Show Org source] button for
> http://orgmode.org/worg/ can be found at
> http://orgmode.org/worg/index.html.
>
>
> My 2 ct,
> --
> Marco Wahl
> GPG: 0x49010A040A3AE6F2
>
>

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

end of thread, other threads:[~2016-01-13 16:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-13  0:09 [Show Org source] button does not work Kynn Jones
2016-01-13  5:08 ` Nick Dokos
2016-01-13  8:33   ` Marco Wahl
2016-01-13 16:11     ` Kynn Jones

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).