Use with Conkeror
Posted October 19th, 2007 by bard
MozRepl documentation has moved. Go to the new home »
Conkeror brings Emacs-style keybindings and mouse independence to everyday surfing sessions in Firefox. To use MozRepl in Conkeror, add the following to its RC file:
Components
.classes['@hyperstruct.net/mozlab/mozrepl;1']
.getService(Components.interfaces.nsIMozRepl)
.start(4242);
More information on Conkeror: Firefox for Emacs Users, Part I and Part 2.
Here is a slightly nicer way to start MozRepl from your conkeror rc. It will only attempt to start MozRepl if MozRepl is in fact installed, and only if MozRepl has not already been started. This latter condition is needed if you want to use Conkeror's reinit command.
Note the aliases Cc and Ci are Conkeror-specific. This code will work in other xulrunner apps, but you would need to replace Cc with Components.classes and Ci with Components.interfaces.
// Mozrepl
//
if ('@hyperstruct.net/mozlab/mozrepl;1' in Cc)
{
var mozrepl = Cc['@hyperstruct.net/mozlab/mozrepl;1']
.getService(Ci.nsIMozRepl);
if (! mozrepl.isActive())
mozrepl.start(4242);
}
Post new comment