My Emacs configuration
My emacs-config, which is using org-mode and has been based on Arjen Wiersma's emacs-config, Sacha Chua's Emacs Configuration, Daniel Mai's Mai Emacs Configuration and Uncle Dave's Emacs configuration.
Beware
Still debugging (my version, not theirs); tested only (my version) with Emacs 25.{1,2} under Linux.
Usage
- rename your existing ~/.emacs.d directory as a backup;
- check that there's no ~/.emacs file (rename it if there is);
- git clone https://github.com/maridonkers/emacs-config.git ~/.emacs.d
Start Emacs and wait until packages are all retrieved and installed.
Emacs daemon
Setting up an Emacs daemon makes it start almost instantaneously! Under Linux the start/stop can be done via systemd, as follows:
In file: ~.config/systemd/user/emacs.service/
1# Usage: systemctl --user {enable,disable,start,restart,stop} emacs.service
2#
3
4[Unit]
5Description=Emacs: the extensible, self-documenting text editor
6
7[Service]
8Type=forking
9ExecStart=/usr/bin/emacs --daemon
10ExecStop=/usr/bin/emacsclient --eval "(progn (setq kill-emacs-hook 'nil) (kill-emacs))"
11Restart=always
12
13# Remove the limit in startup timeout, since emacs
14# cloning and building all packages can take time
15TimeoutStartSec=0
16
17[Install]
18WantedBy=default.target
Reload systemd user configuration
1systemctl daemon-reload --user
Make your PATH known to systemd
If you customize your PATH and plan on launching applications that make use of it from systemd units, you should make sure the modified PATH is set on the systemd environment. The best way to make systemd aware of your modified PATH is by adding the following after the PATH variable is set:
1systemctl --user import-environment PATH
Start, restart, stop Emacs daemon
Use respectively:
1systemctl --user start emacs.service
2
3systemctl --user restart emacs.service
4
5systemctl --user stop emacs.service
Automatically start Emacs daemon at login
1systemctl --user enable emacs.service
Start Emacs as client
Now the Emacs daemon is running you can start an Emacs client, e.g. as follows:
1emacsclient -nc
(with optional filename(s) as additional parameters).
BTW: You can skip all the systemd
configuration and just start emacsclient
as follows:
1emacsclient -nc -a ""