unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David De La Harpe Golden <david@harpegolden.net>
To: pmr@pajato.com
Cc: emacs-devel@gnu.org
Subject: Re: An Emacs plug-in for a browser (Firefox?)
Date: Fri, 05 Sep 2008 01:16:32 +0100	[thread overview]
Message-ID: <48C07A60.5020700@harpegolden.net> (raw)
In-Reply-To: <lu3akf1rnr.fsf@pajato.com>

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





























  reply	other threads:[~2008-09-05  0:16 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-04 22:18 An Emacs plug-in for a browser (Firefox?) Paul Michael Reilly
2008-09-05  0:16 ` David De La Harpe Golden [this message]
2008-09-05  0:19 ` David House
2008-09-05  2:42 ` T. V. Raman
2008-09-05  4:53   ` Paul Michael Reilly
2008-09-05  6:44     ` joakim
2008-09-05  8:53       ` Phil Jackson
2008-09-05  9:21         ` joakim
2008-09-05  9:30           ` Lennart Borgman (gmail)
2008-09-05 11:20             ` Antoine Levitt
2008-09-06  7:12               ` Richard M. Stallman
2008-09-06 10:48                 ` Antoine Levitt
2008-09-06 21:04                   ` Richard M. Stallman
2008-09-06 21:36                     ` David Hansen
2008-09-06 21:49                       ` Lennart Borgman (gmail)
2008-09-06 22:25                         ` David Hansen
2008-09-06 22:48                           ` Lennart Borgman (gmail)
2008-09-06 23:08                             ` David Hansen
2008-09-06 22:41                       ` Sean O'Rourke
2008-09-07 23:36                       ` Richard M. Stallman
2008-09-06 16:42                 ` Chong Yidong
2008-09-06 16:58                   ` joakim
2008-09-06 19:42                     ` Chong Yidong
2008-09-06 20:20                     ` David Hansen
2008-09-06 21:54                   ` T. V. Raman
2008-09-06 20:11                 ` Stefan Monnier
2008-09-07 17:39                   ` Richard M. Stallman
2008-09-07 17:49                     ` Lennart Borgman (gmail)
2008-09-07 18:29                     ` Chong Yidong
2008-09-08  9:22                       ` Richard M. Stallman
2008-09-08 12:31                         ` Chong Yidong
2008-09-08 17:07                           ` Antoine Levitt
2008-09-08 19:05                             ` Thomas Lord
2008-09-08 19:07                               ` Antoine Levitt
2008-09-08 20:27                                 ` Thomas Lord
2008-09-08 20:34                               ` Stefan Monnier
2008-09-08 21:33                                 ` joakim
2008-09-08 21:46                                 ` Thomas Lord
2008-09-09  8:11                               ` Richard M. Stallman
2008-09-08 22:13                           ` Richard M. Stallman
2008-09-07 19:55                     ` Stefan Monnier
2008-09-08  9:22                       ` Richard M. Stallman
2008-09-05 13:33         ` T. V. Raman
2008-09-05 13:32     ` T. V. Raman
2008-09-05 20:40   ` Christian Faulhammer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48C07A60.5020700@harpegolden.net \
    --to=david@harpegolden.net \
    --cc=emacs-devel@gnu.org \
    --cc=pmr@pajato.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).