daleharvey/jshint-mode — pull request #33 by init-js (2014-10-17 08:02:03+00:00)
Title: Allow multiple jshint-mode servers to run simultaneously (allows multiple emacs windows)

The first flymake-jshint starts a server on the base port (3003), but subsequent windows (either in console or graphical mode) fail to enable flymake-jshint due to the port being already taken (EADDRINUSE). Reusing the same server for all lint request would work only as long as the initial window is kept open (flymake processes are cleaned up on exit).

This pull request changes the behavior so that each window starts its own server on the first available port in a range (3003 to 3100). At the time the node process is started in emacs, the port is not known, so there is a bit of emacs lisp code in there to extract the port from the subprocess' stdout. The end result is that multiple emacs windows open can all benefit from the syntax checking.

(heads up: the branch also has a commit to close issue #32)