better detection if emacs is running