Article Title: New School: Emacs only starts one process. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
GNU Emacs supports server/client. Similarly, when you double-click the UltraEditor to open multiple files, you can share one program process. Each time you open a file, you only create a document tag under an existing process. This feature is very useful for Emacs, because as a development environment, many Emacs are not just Emacs, maybe ECB, maybe CEDET, or cs.pdf. These things are loaded for half a day each time Emacs is started. However, if you use the Server/Client method, you only need to start Emacs once, and then open the file each time, but create a Buffer under the started Emacs process.
First, we must set an environment variable:
EMACS_SERVER_FILE = C: \. emacs. d \ server
This variable specifies the server File that emacsclient searches for by default. The file we specified is the Default server File Created by the emacs server.
Next, modify the C: \. emacs file. This file is the default configuration file of Emacs. Add a line to it:
(Server-start)
In this way, the server is automatically started every time Emacs is started. If you want to manually start the server, you can also start emacs and then manually execute:
M-x server-start
Now let's start Emacs and execute the runemacs command.
Find the file you want to Open in the resource manager, and use "Open... "->" Change programme open, then select the emacsclientw.exe program, and check "Always use selected program to open this kind of file" (Sorry, the company uses E-version XP ......).
In the future, you can double-click the file and open it with the same Emacs. Note: you must first start runemacs. Of course, you can also write a bat script to automatically identify (the process is to judge C :\. emacs. d \ server. If not, start runemacs. If yes, start emacsclientw ).