new method for emacsclient/server
making ESS and R-mode work better)