Automatically choose how to open Emacs.