cleanup emacsclient handling