diff options
| -rw-r--r-- | README.md | 17 | ||||
| -rw-r--r-- | emacs/emacs.service | 11 | ||||
| -rw-r--r-- | emacs/init.el | 10 |
3 files changed, 37 insertions, 1 deletions
@@ -8,6 +8,23 @@ a submodule). Vim plugins will also get installed automatically. And that's about it. Use this at your own risk ;) +## Emacs + +For the configuration of Emacs I'm trying out using symlinks instead of copying +files into the right places. For this reason, for now I'm not providing an +automatical way to install everything (this is left to be done in the near +future). These are the files: + +- `emacs/init.el` and `emacs/gtkrc`: should be symlinked into `~/.emacs.d`. +- `emacs/emacs.service`: should be symlinked into `~/.config/systemd/user`. + +Note that `emacs/emacs.service` should be used with the `--user` flag. For +example: + + $ systemctl start --user emacs + $ systemctl enable --user emacs + + ## Runtime dependencies There are some runtime dependencies that matter to either Vim or Emacs. In diff --git a/emacs/emacs.service b/emacs/emacs.service new file mode 100644 index 0000000..d611118 --- /dev/null +++ b/emacs/emacs.service @@ -0,0 +1,11 @@ +[Unit] +Description=Emacs: the extensible, self-documenting text editor + +[Service] +Type=forking +ExecStart=/usr/bin/emacs --daemon +ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)" +Restart=always + +[Install] +WantedBy=default.target diff --git a/emacs/init.el b/emacs/init.el index 750dbaa..0172a03 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -129,7 +129,15 @@ (set-frame-font "Droid Sans Mono Dotted for Powerline-10") (add-to-list 'default-frame-alist '(font . "Droid Sans Mono Dotted for Powerline-10")) -(set-face-attribute 'default t :font "Droid Sans Mono Dotted for Powerline-10") + +; Emacs in daemon mode does not like `set-face-attribute` because this is only +; applied if there is a frame in place, which doesn't happen when starting the +; daemon. Thus, we should call that after the frame has been created (e.g. by +; emacsclient). +; See: https://lists.gnu.org/archive/html/help-gnu-emacs/2015-03/msg00016.html +(add-hook 'after-make-frame-functions-hook + (lambda () + (set-face-attribute 'default t :font "Droid Sans Mono Dotted for Powerline-10"))) ;; Disable C-z. It will later on be picked up by Evil's config as the escape ;; sequence. This is here to make sure that it will be disabled even if Evil |
