you're reading...

How to integrate Firefox and Emacs

Emacs Logo

Sometimes, when you edit a textarea on a web page (for example, to write a new post on your blog), you would really like to use an external text editor for that.

I personally love Emacs, I’m addicted to its shortcuts and key bindings and I would love to use it, for example, for searching and replacing or for applying macros on the text of a textarea.

Well, it seems someone already thought about this. A Firefox plugin to bind an external editor to your browser is available here. In the following lines, I’ll refer to a Linux environment, but the same procedure, by applying some variants, is possible on Mac, too.

Once installed the plugin and restarted Firefox, you might want to edit some preferences.

First of all, specify the following command to be executed:


The reason we don’t simply trigger the emacs command, but we use emacsclient instead is that, if we have an Emacs session open, we would like to attach to that one, so we could easily move between Emacs buffers (thanks to Magnus for this suggestion).

Before this can actually work, though, we need to start a daemon on Emacs. To do so, just open Emacs and do the following:

  • M-x customize-option
  • Variable name: server-mode
  • Click on toggle
  • Save for future sessions
  • Finish

Optionally (and I would strongly advise you to do so), you can bind the trigger of the external editor to a shortcut. I personally use the following:

Alt + E

But this is obviously up to you.

That’s it. You can enjoy editing your text areas in Emacs and make your productivity fly high.

About Roberto Aloi

Software Engineer and Erlanger. Author of www.tryerlang.org.


2 thoughts on “How to integrate Firefox and Emacs

  1. Good tip. It works on Windows (Vista) too.

    however() ->
    case using(indentation) of
    true ->
    false ->

    Posted by Ulf Wiger | January 24, 2010, 6:09 pm
  2. also_remember() ->

    …not sure if it helps though. We’ll see.
    A comment preview function would be nice.🙂

    Posted by Ulf Wiger | January 24, 2010, 6:11 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: