Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
63 lines (46 sloc) 1.27 KB

Stuff for working with phantomjs from within Emacs.


This package requires phantomjs v1.5 to be installed. This package does no checking (yet) for that dependancy.

The location of phantomjs can be controlled with the customizaton variable:


which is expanded before being used (so you can use ~ and .. and such like).


Here's some illustrative EmacsLisp:

(defun test-phantom-complete ()
  (elnode-stop 8005)
  (message "test run done"))

(let (phantom-server)
  (setq phantom-server
         'servertest 6101
  (sleep-for 2)
  ;; Open a url
   (lambda (status arg)
     (sleep-for 3)
     ;; Then exit
      (lambda (status arg)
        (message "plaintalk exited phantom"))))))

It's also possible to call Javascript functions inside the opened web page. That will have to wait for an README.

Building the package

Use make to rebuild this package:

make clean all

will produce the appropriately versioned phantomjs tar file which can then be installed (locally) with:

M-x package-install-file
Something went wrong with that request. Please try again.