The MozRepl extension embeds into Conkeror a JavaScript repl accessible via TCP connection to a port listening on localhost, usually 4242. In some cases, it may be more convenient than M-: and in particular, it includes an Emacs Lisp package that provides an inferior JavaScript shell interface to Conkeror using MozRepl (more information here).

Setup

After installing MozRepl, add one of the following blocks of code to your rc. The first will make the MozRepl server start at Conkeror's startup. The second will start the server immediately, and has the additional property of letting you easily customize the port it listens on.

Scripting Conkeror in bash via MozREPL

He had the excellent idea of using the expect shell command and built a basic (and, he humbly admitted, somewhat crude) implementation. I cleaned it up, added some sed magic and a trivial expect script change to strip extraneous output passed on from the REPL, changed some code to debug-only and added a debug toggle, un-hard-coded a temporary file location, added a small French-to-English lexicon in a comment block to aid maintainers, and got rid of one misplaced (and commented-out) instruction. Otherwise, it's his work.

To use the functions, you need to load mozrepl.sh into a bash shell script or an interactive bash shell using the . or source command, not execute it.

To use mozrepl.sh with Conkeror, you must not pre-load the .mozrepl-conkeror.js snippets from the "Environment Setup" section above; the library is designed to work with a "vanilla" MozREPL in either Conkeror or Firefox/Iceweasel.

I will continue to improve the library as ideas occur to me. If you have your own, either fork the project on GitHub and send a pull request with your changes, or raise an issue on the project's GitHub page.