Newbie School: Emacs only starts one process

Source: Internet
Author: User
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 ).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.