[emacs-integration] moz-save-buffer-and-send into HTML-window?

2 views
Skip to first unread message

LanX

unread,
Nov 1, 2009, 5:20:03 PM11/1/09
to MozLab
Hi

If I send an emacs-buffer to firefox with C-c C-l, it's evaluated in
the XUL-window.

For developing and testing scripts which are meant to be included in
HTML-pages that's not too useful...

So is there a generic solution to execute it in the current HTML
page?

I did some research, but before I reinvent the wheel, is there already
a mechanism for this task?

FYI:

After some poking I added
if (window.content) {repl.enter(window.content)};
at the very beginning of my script, which works in general (but causes
sometimes strange problems...)

But it changes the script...

Thanks
Rolf

Massimiliano Mirra

unread,
Nov 2, 2009, 6:39:39 AM11/2/09
to moz...@googlegroups.com
On Sun, Nov 1, 2009 at 11:20 PM, LanX <lanx...@googlemail.com> wrote:
>
> Hi
>
> If I send an emacs-buffer to firefox with C-c C-l, it's evaluated in
> the XUL-window.
>
> For developing and testing scripts which are meant to be included in
> HTML-pages that's not too useful...
>
> So is there a generic solution to execute it in the current HTML
> page?
>
> I did some research, but before I reinvent the wheel, is there already
> a mechanism for this task?

If you send an emacs-buffer to Firefox with `C-c C-l', it's evaluated
in the current REPL context.

If you want to evaluate in the HTML page, just type
"repl.enter(content)" before you press `C-c C-l'.

>
> FYI:
>
> After some poking I added
>      if (window.content) {repl.enter(window.content)};
> at the very beginning of my script, which works in general (but causes
> sometimes strange problems...)

That's tricky. Don't do that. :)

Reply all
Reply to author
Forward
0 new messages