[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: An Emacs plug-in for a browser (Firefox?)
From: |
David De La Harpe Golden |
Subject: |
Re: An Emacs plug-in for a browser (Firefox?) |
Date: |
Fri, 05 Sep 2008 01:16:32 +0100 |
User-agent: |
Mozilla-Thunderbird 2.0.0.16 (X11/20080724) |
Paul Michael Reilly wrote:
> For example,
> "emacs://x.y.z/some/file/or/other.txt" when presented to the browser
> would fire up a tab on the browser with a full blown Emacs instance
> "embedded/buried" in it and edit the file other.txt with the full
> power of Emacs immersed in the browser. Sandbox issues aside, what
> other issues need to be overcome to create such a browser plugin?
>
Probably lots for full generality and security; but emacs IIRC already
supports the xembed protocol on X11 (--parent-id command line arg?), so
making a basic plugin for firefox should be straightforward on X11
platforms, since firefox also supports xembedding as part of its
extended plugin api on X11.
http://developer.mozilla.org/En/Plugins
- tells you how to write plugins.
http://developer.mozilla.org/en/XEmbed_Extension_for_Mozilla_Plugins
- tells you how to use xembed with mozilla plugins on X11 platforms.
On non-X11 platforms it's presumably quite a bit more awkward...
*** Note that if you don't want to _embed_ emacs into firefox windows,
just want the ability to type "emacs:filename" into the address bar,
then you can just define an external protocol handler:
Doing it this way is probably not entirely secure...
go to about:config
Following
http://kb.mozillazine.org/Register_protocol#Linux_and_Mac
add the following keys (right click -> new)
Boolean -> network.protocol-handler.external.emacs -> True
String -> network.protocol-handler.app.emacs /path/to/emacs-url-wrapper
after making an emacs-url-wrapper that strips the leading "emacs:" from
its arg e.g. (unsafe)
#!/bin/bash
exec emacs $(echo "$1" | sed 's/emacs://')
Now, emacs:/tmp/blah.txt in the firefox address bar should pop up an
emacs...
- An Emacs plug-in for a browser (Firefox?), Paul Michael Reilly, 2008/09/04
- Re: An Emacs plug-in for a browser (Firefox?),
David De La Harpe Golden <=
- Re: An Emacs plug-in for a browser (Firefox?), David House, 2008/09/04
- An Emacs plug-in for a browser (Firefox?), T. V. Raman, 2008/09/04
- Re: An Emacs plug-in for a browser (Firefox?), Paul Michael Reilly, 2008/09/05
- Re: An Emacs plug-in for a browser (Firefox?), joakim, 2008/09/05
- Re: An Emacs plug-in for a browser (Firefox?), Phil Jackson, 2008/09/05
- Re: An Emacs plug-in for a browser (Firefox?), joakim, 2008/09/05
- Re: An Emacs plug-in for a browser (Firefox?), Lennart Borgman (gmail), 2008/09/05
- Re: An Emacs plug-in for a browser (Firefox?), Antoine Levitt, 2008/09/05
- Re: An Emacs plug-in for a browser (Firefox?), Richard M. Stallman, 2008/09/06
- Re: An Emacs plug-in for a browser (Firefox?), Antoine Levitt, 2008/09/06