emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Inserting some java script
@ 2007-01-15 10:44 Graham Smith
  2007-01-15 10:58 ` David Emery
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Graham Smith @ 2007-01-15 10:44 UTC (permalink / raw)
  To: emacs-orgmode


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

My plan (and please someone tell me if this just won't work) is to publish
emacs docs onto my web server and allow selected people to comment on them
using Fleck http://fleck.com/

To access Fleck I want to insert the following code at the top of  the Emacs
document before publishing to HTML

<!-- Start of Fleck WebWidget Code -->
<script type="text/javascript" language="JavaScript" src="
http://webwidget.fleck.com/?v=small_image"></script>
<!-- End of Fleck WebWidget Code -->

But I can't work out how to do this - I just get the text rather than the
icon.

Any help  would be appreciated

Just as background, what I am hoping to to do is to

1. create document in Emacs+Org Mode
2 send to Firefox as HTML (C-c C-e b)
3 Use FireFTP in firfox  to upload to my web space
4. use email with URL to file inviting people to comment.  Reviewers open
link and click on icon created by code above. This opens an annotation tool
bar allowing them to add comments
5 At end of review period, open original document in Emacs and HTML version
from my web server. Review comments in Firefox and update original document
in Emacs

Actually, I would also appreciate any comments on this work flow, and any
alternatives to Fleck.

Many thanks

Graham

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

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

_______________________________________________
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Inserting some java script
  2007-01-15 10:44 Inserting some java script Graham Smith
@ 2007-01-15 10:58 ` David Emery
  2007-01-15 11:34   ` Graham Smith
  2007-01-15 11:11 ` Giovanni Ridolfi
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: David Emery @ 2007-01-15 10:58 UTC (permalink / raw)
  To: myotisone; +Cc: emacs-orgmode

On Date: Mon, 15 Jan 2007 10:44:11 +0000, "Graham Smith" <myotisone@gmail.com> wrote:
> To access Fleck I want to insert the following code at the top of  the Emacs document before publishing to HTML
> 
> <!-- Start of Fleck WebWidget Code -->
> <script type="text/javascript" language="JavaScript" src=" http://webwidget.fleck.com/?v=small_image"></script>
> <!-- End of Fleck WebWidget Code -->
>    
> But I can't work out how to do this - I just get the text rather than the icon.

I think you could just add the javascript tag line before or after the style
info in the setting for customize->export->html->style. That would automatically
put it into every page. 

To put it right into a particular org file, prepending
an "@" to that line should make the html pass through as is.

@<script type="text/javascript" language="JavaScript" src=" http://webwidget.fleck.com/?v=small_image"></script>


Dave

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

* Re: Inserting some java script
  2007-01-15 10:44 Inserting some java script Graham Smith
  2007-01-15 10:58 ` David Emery
@ 2007-01-15 11:11 ` Giovanni Ridolfi
  2007-01-25 12:36 ` David Emery
  2007-02-20 10:16 ` Carsten Dominik
  3 siblings, 0 replies; 11+ messages in thread
From: Giovanni Ridolfi @ 2007-01-15 11:11 UTC (permalink / raw)
  To: emacs-orgmode

On Mon, Jan 15, 2007 at 10:44:11AM +0000, Graham Smith wrote:
> My plan (and please someone tell me if this just won't work) is to publish
> emacs docs onto my web server and allow selected people to comment on them
> using Fleck http://fleck.com/
> 
> To access Fleck I want to insert the following code at the top of  the Emacs
> document before publishing to HTML
> 
> <!-- Start of Fleck WebWidget Code -->
> <script type="text/javascript" language="JavaScript" src="
> http://webwidget.fleck.com/?v=small_image"></script>
> <!-- End of Fleck WebWidget Code -->
> 
Hi,  Graham

did you try to use '@'  before your HTML / java command?

@<center>
In org-publish.html  this will be centered
@</center>

the previuos codex works. I think you could try something like:

 @<script your-script> 
 @</script>
      
HTH

Giovanni

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

* Re: Inserting some java script
  2007-01-15 10:58 ` David Emery
@ 2007-01-15 11:34   ` Graham Smith
  2007-01-15 12:23     ` HTML exporter bug? was " David Emery
  0 siblings, 1 reply; 11+ messages in thread
From: Graham Smith @ 2007-01-15 11:34 UTC (permalink / raw)
  To: emacs-orgmode


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

David,

I don't really want it in every page, but I will look at that as well.

I did try the @ symbol and it didn't work. In fact I hadn't used it
properly, but even using it as you have illustrated, it still gives me text
rather than the link to the webwidget.

Maybe I am doing something silly.

I shall have another go.

Thanks,

Graham

On 15/01/07, David Emery <dave@skiddlydee.com> wrote:
>
> On Date: Mon, 15 Jan 2007 10:44:11 +0000, "Graham Smith" <
> myotisone@gmail.com> wrote:
> > To access Fleck I want to insert the following code at the top of  the
> Emacs document before publishing to HTML
> >
> > <!-- Start of Fleck WebWidget Code -->
> > <script type="text/javascript" language="JavaScript" src="
> http://webwidget.fleck.com/?v=small_image"></script>
> > <!-- End of Fleck WebWidget Code -->
> >
> > But I can't work out how to do this - I just get the text rather than
> the icon.
>
> I think you could just add the javascript tag line before or after the
> style
> info in the setting for customize->export->html->style. That would
> automatically
> put it into every page.
>
> To put it right into a particular org file, prepending
> an "@" to that line should make the html pass through as is.
>
> @<script type="text/javascript" language="JavaScript" src="
> http://webwidget.fleck.com/?v=small_image"></script>
>
>
> Dave
>
>

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

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

_______________________________________________
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* HTML exporter bug? was Re: Inserting some java script
  2007-01-15 11:34   ` Graham Smith
@ 2007-01-15 12:23     ` David Emery
  2007-01-15 15:20       ` Giovanni Ridolfi
  2007-01-16 10:17       ` Carsten Dominik
  0 siblings, 2 replies; 11+ messages in thread
From: David Emery @ 2007-01-15 12:23 UTC (permalink / raw)
  To: emacs-orgmode

On Date: Mon, 15 Jan 2007 11:34:36 +0000, "Graham Smith" <myotisone@gmail.com> wrote:
> I don't really want it in every page, but I will look at that as well.
> 
> I did try the @ symbol and it didn't work. In fact I hadn't used it properly, but even using it as you have illustrated, it
> still gives me text rather than the link to the webwidget.

I just tried it myself and it comes out even weirder than what you described. I
get this:

@&lt;script type="text/javascript" language="JavaScript" src=" <a href="http://webwidget.fleck.com/?v=small_image"">http://webwidget.fleck.com/?v=small_image"</a>&gt;&lt;/script&gt;

It appears that the exporter is confused by the URL within the tags. Here's
another example that shows the same problem:

@<img src="http://staff.science.uva.nl/~dominik/passfoto.jpg" />

It gets exported as:

@&lt;img src="<a href="http://staff.science.uva.nl/~dominik/passfoto.jpg"">http://staff.science.uva.nl/~dominik/passfoto.jpg"</a>
/&gt;


Dave

> 
> Maybe I am doing something silly.
> 
> I shall have another go.
> 
> Thanks,
> 
> Graham
> 
> On 15/01/07, David Emery < dave@skiddlydee.com> wrote:
> 
>     On Date: Mon, 15 Jan 2007 10:44:11 +0000, "Graham Smith" < myotisone@gmail.com> wrote:
>     > To access Fleck I want to insert the following code at the top of  the Emacs document before publishing to HTML
>     >
>     > <!-- Start of Fleck WebWidget Code -->
>     > <script type="text/javascript" language="JavaScript" src=" http://webwidget.fleck.com/?v=small_image"></script>
>     > <!-- End of Fleck WebWidget Code -->
>     >
>     > But I can't work out how to do this - I just get the text rather than the icon.
>    
>     I think you could just add the javascript tag line before or after the style
>     info in the setting for customize->export->html->style. That would automatically
>     put it into every page.
>    
>     To put it right into a particular org file, prepending
>     an "@" to that line should make the html pass through as is.
>    
>     @<script type="text/javascript" language="JavaScript" src=" http://webwidget.fleck.com/?v=small_image"></script>
> 
>     Dave
> 

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

* Re: HTML exporter bug? was Re: Inserting some java script
  2007-01-15 12:23     ` HTML exporter bug? was " David Emery
@ 2007-01-15 15:20       ` Giovanni Ridolfi
  2007-01-16 10:17       ` Carsten Dominik
  1 sibling, 0 replies; 11+ messages in thread
From: Giovanni Ridolfi @ 2007-01-15 15:20 UTC (permalink / raw)
  To: emacs-orgmode

On Mon, Jan 15, 2007 at 09:23:04PM +0900, David Emery wrote:
> 
> It appears that the exporter is confused by the URL within the tags. Here's
> another example that shows the same problem:
> 
> @<img src="http://staff.science.uva.nl/~dominik/passfoto.jpg" />

IMHO  
this is _not_ the right way to insert an image or a link in a
org-mode file, so I do not consider it a bug.

The maual for org-mode 4.61 states[1] that you should use the following
syntax in order to handle an image link:

[[file:http://staff.science.uva.nl/~dominik/passfoto.jpg][file:thumb.jpg]]

Concerning the javascript issue... well, perhaps javascript is not 
(yet? ;-) supported.

Giovanni

P.S.
Here I have a 4.56b ... and it doesn't work either :-/ 

[1] http://staff.science.uva.nl/~dominik/Tools/org/org.html#Images

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

* Re: HTML exporter bug? was Re: Inserting some java script
  2007-01-15 12:23     ` HTML exporter bug? was " David Emery
  2007-01-15 15:20       ` Giovanni Ridolfi
@ 2007-01-16 10:17       ` Carsten Dominik
  1 sibling, 0 replies; 11+ messages in thread
From: Carsten Dominik @ 2007-01-16 10:17 UTC (permalink / raw)
  To: David Emery; +Cc: emacs-orgmode


On Jan 15, 2007, at 13:23, David Emery wrote:

> On Date: Mon, 15 Jan 2007 11:34:36 +0000, "Graham Smith" 
> <myotisone@gmail.com> wrote:
>> I don't really want it in every page, but I will look at that as well.
>>
>> I did try the @ symbol and it didn't work. In fact I hadn't used it 
>> properly, but even using it as you have illustrated, it
>> still gives me text rather than the link to the webwidget.
>
> I just tried it myself and it comes out even weirder than what you 
> described. I
> get this:


Yes, I agree that things inside an html tag protected with @ should be 
fully
protected from any mingling during export, and this is not the case.
Org-mode has not been designed very well as an exportable format, so 
these
things are not easily done.  Part of the problem is that the exporter is
line-based, it looks at the file line by line.

Not sure how much of these problems will disappear in the near future 
:-(

- Carsten

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

* Re: Inserting some java script
  2007-01-15 10:44 Inserting some java script Graham Smith
  2007-01-15 10:58 ` David Emery
  2007-01-15 11:11 ` Giovanni Ridolfi
@ 2007-01-25 12:36 ` David Emery
  2007-01-25 12:49   ` Graham Smith
  2007-02-20 10:16 ` Carsten Dominik
  3 siblings, 1 reply; 11+ messages in thread
From: David Emery @ 2007-01-25 12:36 UTC (permalink / raw)
  To: myotisone; +Cc: emacs-orgmode

On Date: Mon, 15 Jan 2007 10:44:11 +0000, "Graham Smith" <myotisone@gmail.com> wrote:
 To access Fleck I want to insert the following code at the top of  the Emacs document before publishing to HTML
> 
> <!-- Start of Fleck WebWidget Code -->
> <script type="text/javascript" language="JavaScript" src=" http://webwidget.fleck.com/?v=small_image"></script>
> <!-- End of Fleck WebWidget Code -->
>    
> But I can't work out how to do this

I've noticed a workaround (or do I mean ugly kludge?) for this:

#+TEXT: @<script type="text/javascript" src=" http://webwidget.fleck.com">@</script>

The #+TEXT part prevents the URL from being converted to a link, which in turn
allows the "@"s to work properly and escape the tags. 

Dave

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

* Re: Inserting some java script
  2007-01-25 12:36 ` David Emery
@ 2007-01-25 12:49   ` Graham Smith
  0 siblings, 0 replies; 11+ messages in thread
From: Graham Smith @ 2007-01-25 12:49 UTC (permalink / raw)
  To: David Emery; +Cc: emacs-orgmode


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

Dave,

Work around or ugly kludge, or not, this is great to see it can be got
around.

Many thanks.

Graham



On 25/01/07, David Emery <dave@skiddlydee.com> wrote:
>
> On Date: Mon, 15 Jan 2007 10:44:11 +0000, "Graham Smith" <
> myotisone@gmail.com> wrote:
> To access Fleck I want to insert the following code at the top of  the
> Emacs document before publishing to HTML
> >
> > <!-- Start of Fleck WebWidget Code -->
> > <script type="text/javascript" language="JavaScript" src="
> http://webwidget.fleck.com/?v=small_image"></script>
> > <!-- End of Fleck WebWidget Code -->
> >
> > But I can't work out how to do this
>
> I've noticed a workaround (or do I mean ugly kludge?) for this:
>
> #+TEXT: @<script type="text/javascript" src=" http://webwidget.fleck.com
> ">@</script>
>
> The #+TEXT part prevents the URL from being converted to a link, which in
> turn
> allows the "@"s to work properly and escape the tags.
>
> Dave
>
>

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

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

_______________________________________________
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Inserting some java script
  2007-01-15 10:44 Inserting some java script Graham Smith
                   ` (2 preceding siblings ...)
  2007-01-25 12:36 ` David Emery
@ 2007-02-20 10:16 ` Carsten Dominik
  2007-02-20 11:45   ` Graham Smith
  3 siblings, 1 reply; 11+ messages in thread
From: Carsten Dominik @ 2007-02-20 10:16 UTC (permalink / raw)
  To: Graham Smith; +Cc: emacs-orgmode



On Jan 15, 2007, at 11:44, Graham Smith wrote:

> My plan (and please someone tell me if this just won't work) is to 
> publish emacs docs onto my web server and allow selected people to 
> comment on them using Fleck http://fleck.com/
>
>  To access Fleck I want to insert the following code at the top of  
> the Emacs document before publishing to HTML
>
> <!-- Start of Fleck WebWidget Code -->
> <script type="text/javascript" language="JavaScript" src=" 
> http://webwidget.fleck.com/?v=small_image"></script>
> <!-- End of Fleck WebWidget Code -->

In the forthcoming version 4.66, there will be a way to
have some HTML segments exported untouched.

If will work for single lines like this

     #+HTML: this stuff will be exported literally

and for longer chunks like this

     #+BEGIN_HTML
     All lines here will be exported
     literally into HTML, and will be removed
     in ASCII export and all other export backends
     #+END_HTML

- Carsten

>    
> But I can't work out how to do this - I just get the text rather than 
> the icon.
>
> Any help  would be appreciated
>
> Just as background, what I am hoping to to do is to
>
> 1. create document in Emacs+Org Mode
> 2 send to Firefox as HTML (C-c C-e b)
> 3 Use FireFTP in firfox  to upload to my web space
> 4. use email with URL to file inviting people to comment.  Reviewers 
> open link and click on icon created by code above. This opens an 
> annotation tool bar allowing them to add comments
> 5 At end of review period, open original document in Emacs and HTML 
> version from my web server. Review comments in Firefox and update 
> original document in Emacs
>
> Actually, I would also appreciate any comments on this work flow, and 
> any alternatives to Fleck.
>
> Many thanks
>
> Graham
> _______________________________________________
> Emacs-orgmode mailing list
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477

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

* Re: Inserting some java script
  2007-02-20 10:16 ` Carsten Dominik
@ 2007-02-20 11:45   ` Graham Smith
  0 siblings, 0 replies; 11+ messages in thread
From: Graham Smith @ 2007-02-20 11:45 UTC (permalink / raw)
  To: emacs-orgmode


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

Carsten,

Thanks, it just keeps getting bettter :-)

Grahan

On 20/02/07, Carsten Dominik <dominik@science.uva.nl> wrote:
>
>
>
> On Jan 15, 2007, at 11:44, Graham Smith wrote:
>
> > My plan (and please someone tell me if this just won't work) is to
> > publish emacs docs onto my web server and allow selected people to
> > comment on them using Fleck http://fleck.com/
> >
> >  To access Fleck I want to insert the following code at the top of
> > the Emacs document before publishing to HTML
> >
> > <!-- Start of Fleck WebWidget Code -->
> > <script type="text/javascript" language="JavaScript" src="
> > http://webwidget.fleck.com/?v=small_image"></script>
> > <!-- End of Fleck WebWidget Code -->
>
> In the forthcoming version 4.66, there will be a way to
> have some HTML segments exported untouched.
>
> If will work for single lines like this
>
>      #+HTML: this stuff will be exported literally
>
> and for longer chunks like this
>
>      #+BEGIN_HTML
>      All lines here will be exported
>      literally into HTML, and will be removed
>      in ASCII export and all other export backends
>      #+END_HTML
>
> - Carsten
>
> >
> > But I can't work out how to do this - I just get the text rather than
> > the icon.
> >
> > Any help would be appreciated
> >
> > Just as background, what I am hoping to to do is to
> >
> > 1. create document in Emacs+Org Mode
> > 2 send to Firefox as HTML (C-c C-e b)
> > 3 Use FireFTP in firfox to upload to my web space
> > 4. use email with URL to file inviting people to comment. Reviewers
> > open link and click on icon created by code above. This opens an
> > annotation tool bar allowing them to add comments
> > 5 At end of review period, open original document in Emacs and HTML
> > version from my web server. Review comments in Firefox and update
> > original document in Emacs
> >
> > Actually, I would also appreciate any comments on this work flow, and
> > any alternatives to Fleck.
> >
> > Many thanks
> >
> > Graham
> > _______________________________________________
> > Emacs-orgmode mailing list
> > Emacs-orgmode@gnu.org
> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> >
>
> --
> Carsten Dominik
> Sterrenkundig Instituut "Anton Pannekoek"
> Universiteit van Amsterdam
> Kruislaan 403
> NL-1098SJ Amsterdam
> phone: +31 20 525 7477
>
>

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

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

_______________________________________________
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2007-02-20 11:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-15 10:44 Inserting some java script Graham Smith
2007-01-15 10:58 ` David Emery
2007-01-15 11:34   ` Graham Smith
2007-01-15 12:23     ` HTML exporter bug? was " David Emery
2007-01-15 15:20       ` Giovanni Ridolfi
2007-01-16 10:17       ` Carsten Dominik
2007-01-15 11:11 ` Giovanni Ridolfi
2007-01-25 12:36 ` David Emery
2007-01-25 12:49   ` Graham Smith
2007-02-20 10:16 ` Carsten Dominik
2007-02-20 11:45   ` Graham Smith

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