My take on emacsclient

Emacs is pretty lightweight relative to most modern editors, though by the time it loads all the modes and gets through all the uncompiled junk in my .emacs configuration, you wouldn't know it.

Emacsclient is the solution - when you open a file with emacsclient, it doesn't start up a whole new emacs - it just opens it in the running emacs, which is more or less instantaneous.

There are lots of webpages on this, so I won't go into detail. Unfortunately, although you'd hope that calling 'emacsclient' would work just like 'emacs', this isn't true:

These issues were annoying enough that I nearly stopped using emacsclient. Various people have offered shell script hacks that handle some of these issues and more, but none of them solved the ones that bothered me. Plus, I like Python and I hate shell scripts. So I offer up a teeny python script, emf-on-display. If you alias 'emf-on-display' to something handy like 'e', then it makes emacsclient behave in a way that I find much more consistent with emacs.

P.S. I have not dealt with the possibility that you're running this in the terminal, and you don't have an X11 display at all.

P.P.S. I suspect that it requires emacs 22 (or gnuclient) to work, since it relies on being able to pass 'make-frame-on-display' as elisp code to be evaluated.





Belongs to these tags