The first thing we need to do is to know how to activate server mode in Emacs. You can just type
M-x server-startor put
(server-start)in .emacs file.
Next, run emacs inside a screen started as a daemon,
screen -dmS emacs emacs-snapshot -nw
Note that the emacs used here is the snapshot version built from CVS repository. Only the CVS version of emacsclient supports the -t option that will be talked later.
Then, use emacsclient to edit a file called foo.txt
emacsclient.emacs-snapshot -t foo.txt
That's it. Happy emacsing.
you don't know we have emacs daemon mode now?
回覆刪除This is new to me. I'll check it out.
回覆刪除Thanks for the tip.
>emacs --help
回覆刪除--daemon start a server in the background.
Although it claims that a server is started in the background, you still have to load the server mode before using emacsclient to edit files.