"Edit with Emacs" Chrome extension

Alex Bennée has written an Edit with Emacs extension for Google Chrome. It's Chrome's answer to Firefox's "It's all text" extension, which makes composing emails, blog posts, and other long-form text in a browser a lot more tolerable. (Hooray!)

Since Chrome extensions can't spawn arbitrary processes, the Edit with Emacs extension requires the cooperation of an additional edit server that can. The edit server is implemented in elisp and is bundled with the extension.

Installation instructions:

  1. Visit the extension gallery page and click "Install".
  2. In Chrome, click on the wrench menu, Extensions, "Options" under "Edit with Emacs", and follow the instructions there for setting up the edit server.
  3. After configuring the edit server, click "Test Edit Server" to make sure everything is working.
  4. Henceforth, in any new tabs you open, you'll see a little "edit" button next to any textarea elements, which you can click on to pop up a new editor frame. (You can also double-click on the textarea.)

5 comments:

  1. Have you figured out how to get offline Gmail working under Linux, now? Google Gears doesn't work under firefox-3.6 or Linux Chrome.

    It does under Windows Chrome :P

    ReplyDelete
  2. Never used offline Gmail on Linux, sorry.

    ReplyDelete
  3. >> 3. After configuring the edit server, click "Test Edit Server" to make sure everything is working.

    Can you elaborate on that bit?

    Or does this make perfect sense to someone adept at Emacs. I got a tip that this can be used to plug into other editors, but there's still confusion for me.

    ReplyDelete
  4. > I got a tip that this can be used to plug into other editors

    I would be surprised if this were true (and easy to do).

    The extension itself gives you some instructions for how to load the requisite code into your Emacs, but there's not much to it (save this, copy and paste that).

    That's because a substantial part of the functionality of this extension is in the edit server (implemented in Elisp itself), which receives HTTP requests from Chrome and then pops open an Emacs frame for you. While I'm sure you could tweak that to instead spawn some other editor if you wished, it seems weird to have Emacs (or this extension) in the loop at all of you are going to go that route.

    The Firefox analogue, It's All Text, has no such weirdness because Firefox extensions are directly able to spawn new processes. So from the extension's perspective, all external editors are basically equivalent.

    ReplyDelete
  5. > it seems weird to have Emacs (or this extension) in the loop at all of you are going to go that route.

    Aha, so I see now that the extension author provides an alternative edit server implementation as a Python script. This one can spawn the editor of your choice, and would indeed allow you to use this extension without running Emacs:

    https://github.com/stsquad/emacs_chrome/wiki/edit-server
    https://github.com/stsquad/emacs_chrome/blob/master/servers/pycl.py

    ReplyDelete