Mozilla

Create quicksearch for Emacs Wiki pages

Create a new bookmark using the Bookmark Manager. Use these attributes:

Name
Use “Emacs Wiki Quicksearch” or similar
Location
http://www.emacswiki.org/cgi-bin/wiki?search=%s

Then left-click on the new bookmark and edit its properties. Add the following attribute:

Keyword
emacs

Now type “emacs <term>” in the adressbar to search the wiki for a term.

Developing with Firefox

jsSlime provides an interface for Firefox’ JavaScript debugger.

Editing text areas with Emacs

Firefox add-on: It's all text

You can also use It's All Text for this. In the preferences for the extension, point it toward either emacs or emacsclient. Note that you might have to then restart the browser in order for the editor to be recognized. This extension gives you a cute little button that hovers near the text area to click in order to start the editing. It also has hotkey support, and you can specify what extension is used for the temporary file – which is handy for having it trigger the correct emacs mode. It’s All Text does not block Firefox while editing, and you don’t have to close the editor to update the text area.

To use Native Windows Emacs from Firefox to edit HTML input text areas (like Wikipedia and other Wiki pages), see a small Github Cygwin project by JariAalto. It contains source code to build a utility that can be used in It's All Text add-on to call running Emacs, provided that you start Emacs with M-x server-start.

Firefox add-on: Firemacs

Firemacs (firefox add-on) provides some Emacs-like key bindings for Firefox.

Firefox add-on: KeySnail

KeySnail is the yet another firefox add-on for Emacs junkies which is similar to Vimperator.

Online editor 9ne

9ne (pronounced “nine”) is an online code editor based on Emacs (Copyright 2006 Rob Rohan). 9ne is a recursive acronym and joke, and means “9ne is not Emacs”.

Now let’s bolt on a JavaScript Lisp Interpreter
Title ideas for Ajax version: Ajacs, Amacs, Amax, Ejacs, Ejax, Emax.

Emacs keybindings

Unix or GNU/Linux

THEY decided that Emacs compatible keybindings are not What The User Wants, and removed them in Firefox 1.0. Luckily, THEY use Gtk, and Gtk thinks of us. (This was found on Bugzilla)

Add the following lines to your ~/.gtkrc-2.0:

   # Get firefox to use emacs keybindings
   include "/usr/share/themes/Emacs/gtk-2.0-key/gtkrc"
   gtk-key-theme-name = "Emacs"

Be sure that that path exists, it may vary between distributions. After that, you should feel at home in most parts of Firefox.

In recent versions of GNOME (3 or later) you need to use the gsettings tool to set the key theme to emacs.

    gsettings set org.gnome.desktop.interface gtk-key-theme "Emacs"

Recent versions of Firefox are compiled against GTK 3. If you are using Firefox, but not GNOME, you can configure Emacs key bindings by adding the following to your ~/.config/gtk-3.0/settings.ini:

   # Get firefox to use emacs keybindings
   [Settings]
   gtk-key-theme-name = Emacs

Please feel free to save this as a file somewhere and replace the actual code here with a link. I would have done so myself but I’m not sure where to put it - the Elisp area seems only for elisp.


Other Browsers

Stuff for Emacs Wiki users with Mozilla browsers. Stuff that is specific to FireFox is found there.

Conkeror might be an interesting Firefox alternative.

MozMacs helps a little.

XKeymacs from 2007 adds emacs keybindings to all Windows apps. (via)

Windows

Unfortunately, setting Gtk environment variables doesn’t work on Win32. The best solution I’ve found is to edit C:\Program Files\Mozilla Firefox\res\builtin\platformHTMLBindings.xml

Also try the Keyconfig extension for Firefox, for browser function keys (ie, make “C-s” search instead of “C-f”).

Here’s my platformHTMLBindings.xml. You should be able to just overwrite your existing one.

<?xml version="1.0"?>

<bindings id="htmlBindings"
   xmlns="http://www.mozilla.org/xbl"
   xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

  <binding id="inputFields">
    <handlers>
    <handler event="keypress" keycode="VK_LEFT" command="cmd_charPrevious"/>
    <handler event="keypress" keycode="VK_RIGHT" command="cmd_charNext"/>
    <handler event="keypress" keycode="VK_LEFT" modifiers="shift"
        command="cmd_selectCharPrevious"/>
    <handler event="keypress" keycode="VK_RIGHT" modifiers="shift"
        command="cmd_selectCharNext"/>

    <!-- Cut/copy/paste/undo -->
    <handler event="keypress" key="c" modifiers="accel" command="cmd_copy"/>
    <handler event="keypress" key="x" modifiers="accel" command="cmd_cut"/>
    <handler event="keypress" key="v" modifiers="accel" command="cmd_paste"/>
    <handler event="keypress" key="z" command="cmd_redo" modifiers="accel,shift" />
    <handler event="keypress" key="z" modifiers="accel" command="cmd_undo"/>

    <!-- Emacsish single-line motion and delete keys -->
    <handler event="keypress" key="a" modifiers="control"
        command="cmd_beginLine"/>
    <handler event="keypress" key="e" modifiers="control"
        command="cmd_endLine"/>
    <handler event="keypress" key="b" modifiers="control"
        command="cmd_charPrevious"/>
    <handler event="keypress" key="f" modifiers="control"
        command="cmd_charNext"/>
    <handler event="keypress" key="h" modifiers="control"
        command="cmd_deleteCharBackward"/>
    <handler event="keypress" key="d" modifiers="control"
        command="cmd_deleteCharForward"/>
    <handler event="keypress" key="w" modifiers="control"
        command="cmd_deleteWordBackward"/>
    <handler event="keypress" key="u" modifiers="control"
        command="cmd_deleteToBeginningOfLine"/>
    <handler event="keypress" key="k" modifiers="control"
        command="cmd_deleteToEndOfLine"/>

    <!-- Alternate Windows copy/paste/undo/redo keys -->
    <handler event="keypress" keycode="VK_DELETE" modifiers="shift"
        command="cmd_cutOrDelete"/>
    <handler event="keypress" keycode="VK_DELETE" modifiers="control"
        command="cmd_copyOrDelete"/>
    <handler event="keypress" keycode="VK_INSERT" modifiers="control"
        command="cmd_copy"/>
    <handler event="keypress" keycode="VK_INSERT" modifiers="shift"
        command="cmd_paste"/>

    <!-- navigating by word keys -->
    <handler event="keypress" keycode="VK_HOME"
        command="cmd_beginLine"/>
    <handler event="keypress" keycode="VK_END"
        command="cmd_endLine"/>
    <handler event="keypress" keycode="VK_HOME" modifiers="shift"
        command="cmd_selectBeginLine"/>
    <handler event="keypress" keycode="VK_END" modifiers="shift"
        command="cmd_selectEndLine"/>
    <handler event="keypress" keycode="VK_HOME" modifiers="control"
        command="cmd_beginLine"/>
    <handler event="keypress" keycode="VK_END" modifiers="control"
        command="cmd_endLine"/>
    <handler event="keypress" keycode="VK_HOME" modifiers="control,shift"
        command="cmd_selectBeginLine"/>
    <handler event="keypress" keycode="VK_END" modifiers="control,shift"
        command="cmd_selectEndLine"/>
    <handler event="keypress" keycode="VK_BACK" modifiers="control"
        command="cmd_deleteWordBackward"/>

    <handler event="keypress" keycode="VK_LEFT" modifiers="control"
        command="cmd_wordPrevious"/>
    <handler event="keypress" keycode="VK_RIGHT" modifiers="control"
        command="cmd_wordNext"/>
    <handler event="keypress" keycode="VK_LEFT" modifiers="shift,control"
        command="cmd_selectWordPrevious"/>
    <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,control"
        command="cmd_selectWordNext"/>
    <handler event="keypress" key="y" modifiers="accel"
        command="cmd_redo"/>
    <handler event="keypress" key="a" modifiers="alt"
        command="cmd_selectAll"/>
    <handler event="keypress" keycode="VK_F20" command="cmd_cut" />
    <handler event="keypress" keycode="VK_F16" command="cmd_copy" />
    <handler event="keypress" keycode="VK_F18" command="cmd_paste" />
    <handler event="keypress" keycode="VK_F14" command="cmd_undo" />
    </handlers>
  </binding>

  <binding id="textAreas">
    <handlers>
    <handler event="keypress" keycode="VK_LEFT" command="cmd_charPrevious"/>
    <handler event="keypress" keycode="VK_RIGHT" command="cmd_charNext"/>
    <handler event="keypress" keycode="VK_LEFT" modifiers="shift"
        command="cmd_selectCharPrevious"/>
    <handler event="keypress" keycode="VK_RIGHT" modifiers="shift"
        command="cmd_selectCharNext"/>
    <handler event="keypress" keycode="VK_UP" command="cmd_linePrevious"/>
    <handler event="keypress" keycode="VK_DOWN" command="cmd_lineNext"/>
    <handler event="keypress" keycode="VK_UP" modifiers="shift"
        command="cmd_selectLinePrevious"/>
    <handler event="keypress" keycode="VK_DOWN" modifiers="shift"
        command="cmd_selectLineNext"/>

    <!-- Cut/copy/paste/undo -->
    <handler event="keypress" key="c" modifiers="accel" command="cmd_copy"/>
    <handler event="keypress" key="x" modifiers="accel" command="cmd_cut"/>
    <handler event="keypress" key="v" modifiers="accel" command="cmd_paste"/>
    <handler event="keypress" key="z" modifiers="accel" command="cmd_undo"/>
    <handler event="keypress" key="z" command="cmd_redo" modifiers="accel,shift" />
    <!-- Emacsish single-line motion and delete keys -->
    <handler event="keypress" key="a" modifiers="control"
        command="cmd_beginLine"/>
    <handler event="keypress" key="e" modifiers="control"
        command="cmd_endLine"/>
    <handler event="keypress" id="key_left" key="b" modifiers="control"
        command="cmd_charPrevious"/>
    <handler event="keypress" id="key_right" key="f" modifiers="control"
        command="cmd_charNext"/>
    <handler event="keypress" id="key_delback" key="h" modifiers="control"
        command="cmd_deleteCharBackward"/>
    <handler event="keypress" id="key_delforw" key="d" modifiers="control"
        command="cmd_deleteCharForward"/>
    <handler event="keypress" id="key_delwback" key="w" modifiers="control"
        command="cmd_deleteWordBackward"/>
    <handler event="keypress" id="key_del_bol" key="u" modifiers="control"
        command="cmd_deleteToBeginningOfLine"/>
    <handler event="keypress" id="key_del_eol" key="k" modifiers="control"
        command="cmd_deleteToEndOfLine"/>

    <!-- Alternate Windows copy/paste/undo/redo keys -->
    <handler event="keypress" keycode="VK_DELETE" modifiers="shift"
        command="cmd_cutOrDelete"/>
    <handler event="keypress" keycode="VK_DELETE" modifiers="control"
        command="cmd_copyOrDelete"/>
    <handler event="keypress" keycode="VK_INSERT" modifiers="control"
        command="cmd_copy"/>
    <handler event="keypress" keycode="VK_INSERT" modifiers="shift"
        command="cmd_paste"/>

    <!-- Emacsish multi-line motion and delete keys -->
    <handler event="keypress" id="key_linedown" key="n" modifiers="control"
        command="cmd_lineNext"/>
    <handler event="keypress" id="key_lineup" key="p" modifiers="control"
        command="cmd_linePrevious"/>

    <!-- handle home/end/arrow keys and redo -->
    <handler event="keypress" keycode="VK_HOME"
        command="cmd_beginLine"/>
    <handler event="keypress" keycode="VK_END"
        command="cmd_endLine"/>
    <handler event="keypress" keycode="VK_HOME" modifiers="shift"
        command="cmd_selectBeginLine"/>
    <handler event="keypress" keycode="VK_END" modifiers="shift"
        command="cmd_selectEndLine"/>

    <handler event="keypress" keycode="VK_HOME" modifiers="control"
        command="cmd_moveTop"/>
    <handler event="keypress" keycode="VK_END" modifiers="control"
        command="cmd_moveBottom"/>
    <handler event="keypress" keycode="VK_HOME" modifiers="shift,control"
        command="cmd_selectTop"/>
    <handler event="keypress" keycode="VK_END" modifiers="shift,control"
        command="cmd_selectBottom"/>

    <handler event="keypress" keycode="VK_PAGE_UP"
        command="cmd_movePageUp"/>
    <handler event="keypress" keycode="VK_PAGE_DOWN"
        command="cmd_movePageDown"/>
    <handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift"
        command="cmd_selectPageUp"/>
    <handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="shift"
        command="cmd_selectPageDown"/>

    <handler event="keypress" keycode="VK_LEFT" modifiers="control"
        command="cmd_wordPrevious"/>
    <handler event="keypress" keycode="VK_RIGHT" modifiers="control"
        command="cmd_wordNext"/>
    <handler event="keypress" keycode="VK_LEFT" modifiers="shift,control"
        command="cmd_selectWordPrevious"/>
    <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,control"
        command="cmd_selectWordNext"/>
    <handler event="keypress" keycode="VK_BACK" modifiers="control"
        command="cmd_deleteWordBackward"/>
    <handler event="keypress" key="y" modifiers="accel"
        command="cmd_redo"/>
    <handler event="keypress" key="a" modifiers="alt"
        command="cmd_selectAll"/>
    <handler event="keypress" keycode="VK_F20" command="cmd_cut" />
    <handler event="keypress" keycode="VK_F16" command="cmd_copy" />
    <handler event="keypress" keycode="VK_F18" command="cmd_paste" />
    <handler event="keypress" keycode="VK_F14" command="cmd_undo" />
    </handlers>
  </binding>

  <binding id="browser">
    <handlers>
      <handler event="draggesture">
<!--
         nsDragAndDrop.startDrag(event, contentAreaDNDObserver);
-->
      </handler>
      <handler event="dragover">
<!--
         nsDragAndDrop.dragOver(event, contentAreaDNDObserver);
-->
      </handler>
      <handler event="dragdrop">
<!--
         nsDragAndDrop.drop(event, contentAreaDNDObserver);
-->
      </handler>

      <handler event="keypress" key=" " modifiers="shift" command="cmd_scrollPageUp" />
      <handler event="keypress" key=" " command="cmd_scrollPageDown" />

      <handler event="keypress" keycode="VK_UP" command="cmd_scrollLineUp" />
      <handler event="keypress" keycode="VK_DOWN" command="cmd_scrollLineDown" />
      <handler event="keypress" keycode="VK_LEFT" command="cmd_scrollLeft" />
      <handler event="keypress" keycode="VK_RIGHT" command="cmd_scrollRight" />

      <handler event="keypress" keycode="VK_HOME" command="cmd_scrollTop"/>
      <handler event="keypress" keycode="VK_END" command="cmd_scrollBottom"/>

      <handler event="keypress" key="x" command="cmd_cut" modifiers="accel"/>
      <handler event="keypress" key="c" command="cmd_copy" modifiers="accel"/>
      <handler event="keypress" key="v" command="cmd_paste" modifiers="accel"/>
      <handler event="keypress" key="z" command="cmd_undo" modifiers="accel"/>
      <handler event="keypress" key="z" command="cmd_redo" modifiers="accel,shift" />
      <handler event="keypress" key="a" command="cmd_selectAll" modifiers="accel"/>

      <handler event="keypress" key="/" command="cmd_findTypeText"/>
      <handler event="keypress" key="'" command="cmd_findTypeLinks"/>
      <handler event="keypress" keycode="VK_PAGE_UP" command="cmd_movePageUp"/>
      <handler event="keypress" keycode="VK_PAGE_DOWN" command="cmd_movePageDown"/>
      <handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift" command="cmd_selectPageUp"/>
      <handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="shift" command="cmd_selectPageDown"/>

      <handler event="keypress" keycode="VK_DELETE" modifiers="shift" command="cmd_cut" />
      <handler event="keypress" keycode="VK_DELETE" modifiers="control" command="cmd_copy" />
      <handler event="keypress" keycode="VK_INSERT" modifiers="control" command="cmd_copy" />
      <handler event="keypress" keycode="VK_HOME" modifiers="shift,control" command="cmd_selectTop" />
      <handler event="keypress" keycode="VK_END" modifiers="shift,control" command="cmd_selectBottom" />
      <handler event="keypress" keycode="VK_F20" command="cmd_cut" />
      <handler event="keypress" keycode="VK_F16" command="cmd_copy" />
      <handler event="keypress" keycode="VK_F18" command="cmd_paste" />
      <handler event="keypress" keycode="VK_F14" command="cmd_undo" />
      <handler event="keypress" keycode="VK_LEFT" modifiers="control" command="cmd_wordPrevious" />
      <handler event="keypress" keycode="VK_RIGHT" modifiers="control" command="cmd_wordNext" />
      <handler event="keypress" keycode="VK_LEFT" modifiers="control,shift" command="cmd_selectWordPrevious" />
      <handler event="keypress" keycode="VK_RIGHT" modifiers="control,shift" command="cmd_selectWordNext" />
      <handler event="keypress" keycode="VK_LEFT" modifiers="shift" command="cmd_selectCharPrevious" />
      <handler event="keypress" keycode="VK_RIGHT" modifiers="shift" command="cmd_selectCharNext" />
      <handler event="keypress" keycode="VK_HOME" modifiers="shift" command="cmd_selectBeginLine" />
      <handler event="keypress" keycode="VK_END" modifiers="shift" command="cmd_selectEndLine" />
      <handler event="keypress" keycode="VK_UP" modifiers="shift" command="cmd_selectLinePrevious" />
      <handler event="keypress" keycode="VK_DOWN" modifiers="shift" command="cmd_selectLineNext" />
      <handler event="keypress" key="a" modifiers="alt" command="cmd_selectAll"/>
    </handlers>
  </binding>

  <binding id="editor">
    <handlers>
      <handler event="keypress" keycode="VK_LEFT" command="cmd_charPrevious"/>
      <handler event="keypress" keycode="VK_RIGHT" command="cmd_charNext"/>
      <handler event="keypress" keycode="VK_LEFT" command="cmd_selectCharPrevious" modifiers="shift"/>
      <handler event="keypress" keycode="VK_RIGHT" command="cmd_selectCharNext" modifiers="shift"/>
      <handler event="keypress" keycode="VK_UP" command="cmd_linePrevious"/>
      <handler event="keypress" keycode="VK_DOWN" command="cmd_lineNext"/>
      <handler event="keypress" keycode="VK_UP" command="cmd_selectLinePrevious" modifiers="shift"/>
      <handler event="keypress" keycode="VK_DOWN" command="cmd_selectLineNext" modifiers="shift"/>
      <handler event="keypress" key="z" command="cmd_undo" modifiers="accel"/>
      <handler event="keypress" key="z" command="cmd_redo" modifiers="accel,shift" />
      <handler event="keypress" key="x" command="cmd_cut" modifiers="accel"/>
      <handler event="keypress" key="c" command="cmd_copy" modifiers="accel"/>
      <handler event="keypress" key="v" command="cmd_paste" modifiers="accel"/>
      <handler event="keypress" key="h" modifiers="control" command="cmd_deleteCharBackward"/>
      <handler event="keypress" key="d" modifiers="control" command="cmd_deleteCharForward"/>
      <handler event="keypress" key="k" modifiers="control" command="cmd_deleteToEndOfLine"/>
      <handler event="keypress" key="u" modifiers="control" command="cmd_deleteToBeginningOfLine"/>
      <handler event="keypress" key="a" modifiers="control" command="cmd_beginLine"/>
      <handler event="keypress" key="e" modifiers="control" command="cmd_endLine"/>
      <handler event="keypress" key="b" modifiers="control" command="cmd_charPrevious"/>
      <handler event="keypress" key="f" modifiers="control" command="cmd_charNext"/>
      <handler event="keypress" key="p" modifiers="control" command="cmd_linePrevious"/>
      <handler event="keypress" key="n" modifiers="control" command="cmd_lineNext"/>
      <handler event="keypress" key="x" modifiers="control" command="cmd_cut"/>
      <handler event="keypress" key="c" modifiers="control" command="cmd_copy"/>
      <handler event="keypress" key="v" modifiers="control" command="cmd_paste"/>
      <handler event="keypress" key="z" modifiers="control" command="cmd_undo"/>
      <handler event="keypress" key="y" modifiers="accel"   command="cmd_redo"/>
      <handler event="keypress" key="a" modifiers="alt" command="cmd_selectAll"/>
      <handler event="keypress" keycode="VK_DELETE" modifiers="shift" command="cmd_cutOrDelete"/>
      <handler event="keypress" keycode="VK_DELETE" modifiers="control" command="cmd_copyOrDelete"/>
      <handler event="keypress" keycode="VK_INSERT" modifiers="control" command="cmd_copy"/>
      <handler event="keypress" keycode="VK_INSERT" modifiers="shift" command="cmd_paste"/>
      <handler event="keypress" keycode="VK_LEFT" modifiers="control" command="cmd_wordPrevious"/>
      <handler event="keypress" keycode="VK_RIGHT" modifiers="control" command="cmd_wordNext"/>
      <handler event="keypress" keycode="VK_LEFT" modifiers="shift,control" command="cmd_selectWordPrevious"/>
      <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,control" command="cmd_selectWordNext"/>
      <handler event="keypress" keycode="VK_BACK" modifiers="control" command="cmd_deleteWordBackward"/>
      <handler event="keypress" keycode="VK_HOME" command="cmd_beginLine"/>
      <handler event="keypress" keycode="VK_END" command="cmd_endLine"/>
      <handler event="keypress" keycode="VK_HOME" modifiers="shift" command="cmd_selectBeginLine"/>
      <handler event="keypress" keycode="VK_END" modifiers="shift" command="cmd_selectEndLine"/>
      <handler event="keypress" keycode="VK_HOME" modifiers="shift,control" command="cmd_selectTop"/>
      <handler event="keypress" keycode="VK_END" modifiers="shift,control" command="cmd_selectBottom"/>
      <handler event="keypress" keycode="VK_HOME" modifiers="control" command="cmd_moveTop"/>
      <handler event="keypress" keycode="VK_END" modifiers="control" command="cmd_moveBottom"/>
      <handler event="keypress" keycode="VK_PAGE_UP" command="cmd_movePageUp"/>
      <handler event="keypress" keycode="VK_PAGE_DOWN" command="cmd_movePageDown"/>
      <handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift" command="cmd_selectPageUp"/>
      <handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="shift" command="cmd_selectPageDown"/>
      <handler event="keypress" keycode="VK_F20" command="cmd_cut" />
      <handler event="keypress" keycode="VK_F16" command="cmd_copy" />
      <handler event="keypress" keycode="VK_F18" command="cmd_paste" />
      <handler event="keypress" keycode="VK_F14" command="cmd_undo" />
    </handlers>
  </binding>
</bindings>


CategoryRelated