When i use Firefox, there’s nothing more annoying than editing a textarea. On a Mac, one has at least some Emacs-like shortcuts. Incomprehensibly, on GTK+ 2.0 Emacs shortcuts are no longer the default, and one has to put something like
~/.gtkrc-2.0 to restore a minimum of sanity.
But still, what i really want is to edit those textareas using the real thing. I just stumbled upon the answer to my prayers: It’s All Text! is a Firefox add-on that provides an edit button on any text box. You click on it and, the first time, you’re asked for your editor of choice. As you’ll notice, the default option is wrong. Change it by
/usr/bin/emacsclient (Emacs 21 users may use gnuclient instead), and don’t forget to start the Emacs server with
(server-start) somewhere in your initialisation file.
Update: Well, things can be even better, as pointed out by Victor below. The Mozex extension lets you not only edit textareas, but also assign shortcuts, view sources or choose the editor for mailto URLs. For some reason, using just
emacsclient -e '(compose-mail "%a" "%s")' didn’t work for me, so i’ve created a simple shell script,
#!/bin/sh exec emacsclient -e "(compose-mail \"$1\" \"$2\")"
and told Mozex to use it. Don’t forget to set the variable
mail-user-agent to something reasonable (for instance, since i use Gnus, i’ve got
(setq mail-user-agent 'gnus-user-agent) in my configuration files).