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:
- I wanted to tell emacsclient to display an emacs frame, without feeding it any filename arguments to display. No dice.
- If I don't have a running emacs server (necessary for emacsclient to connect to), it just gives you an error message, rather than taking matters into its own hands and opening up a new emacs instance.
- If I have emacs running on one computer, and I ssh into that computer, then I want to be able to type emacsclient and have a window show up. No dice. You have to explicitly feed it a display.
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.
No comments:
Post a Comment