Launching your favourite editor in Firefox

After a bit of tweaking, I’m now happily using the the It’s All Text! plugin to let me to edit webpage text boxes with Emacs. It also works with other text editors. [UPDATE: Actually, my browser is Iceweasel, not Firefox. See the Mozilla software rebranding article on Wikipedia, and the IceCat project]

To configure it, go to Tools->It’s All Text!->Preferences in Firefox’s menu bar. In the editor field, when I added some command line options to make Emacs start quickly, it gave me the error "Unable to open your editor". So I made a "quickmacs.sh" file and told It’s All Text that that that was my editor. In quickmacs.sh, I put:

#!/bin/sh
gnome-terminal -t "QM $1" -e "emacs -nw -Q --load ~/software/tb.el $1"

The second "$1" is essential. I want Emacs in non-gui mode, so it has to be launched by a terminal program because It’s All Text! doesn’t run the given editor command in a terminal. tb.el is a a cut down version of my emacs.el. It just contains the minimal convenience settings I want for editing textboxes:

(transient-mark-mode t)
(show-paren-mode t)
(menu-bar-mode 0)
(defun ciaran-turn-on-french-input-method ()
   "set the input method to French"
   (interactive)
   (set-input-method "french-alt-postfix"))
(global-set-key [?\C-c ?.] 'ciaran-turn-on-french-input-method)
(longlines-mode t)

There were two other interesting plugins. The first is EmbeddedEditor 0.1, but you have to make an account and log in if you want to download it, so I ignored it. The second is Firemacs, but that’s adding some Emacs features to Firefox – I prefer to have a full Emacs.

— 
Ciarán O’Riordan,
Support free software: Join FSFE’s Fellowship