1

I am trying to get used to Emacs. I have a problem with the startup time of the Emacs and I give up Emacs easily when the startup times for "vim", "subl" (sublime text), and "code" (vs code) are much shorter and it is convenient to bring them up.

I want to solve the startup time and accessibility to emacs by

a) Running the emacs always in the background.

b) Configuring a hotkey to bring it to the foreground, start editing a file, and pressing a key to push to the background again.

I am using SpaceEmacs distribution of Emacs on Mac.

Any suggestions on how to accomplish a) and b) ?

Senthil Kumaran
  • 183
  • 2
  • 8

1 Answers1

1

I have this line in my .bashrc

alias e='emacsclient -c -n --alternate-editor=""'

When I want to edit a file I can just type

e <file>

The first time you run this it will start the emacs client, every time after the first is lightening fast.

You may also want to add this into your .init.el because closing your window will not shutdown the server.

(defun shutdown ()
  "Shutdown Emacs client and save all files."
  (interactive)
  (save-some-buffers)
  (kill-emacs))
Shane
  • 111
  • 3