From a11335ce57a2fb927a4c25981dd9ff0a8f74315e Mon Sep 17 00:00:00 2001 From: earnest ma Date: Fri, 28 Jan 2022 20:44:45 -0500 Subject: [PATCH] WIP: Emacs config --- emacs/.config/emacs/.gitignore | 5 +++++ emacs/.config/emacs/early-init.el | 17 +++++++++++++++++ emacs/.config/emacs/init.el | 2 ++ systemd/.config/systemd/user/emacs@.service | 12 ++++++++++++ 4 files changed, 36 insertions(+) create mode 100644 emacs/.config/emacs/.gitignore create mode 100644 emacs/.config/emacs/early-init.el create mode 100644 emacs/.config/emacs/init.el create mode 100644 systemd/.config/systemd/user/emacs@.service diff --git a/emacs/.config/emacs/.gitignore b/emacs/.config/emacs/.gitignore new file mode 100644 index 0000000..6a6ca08 --- /dev/null +++ b/emacs/.config/emacs/.gitignore @@ -0,0 +1,5 @@ +auto-save-list +straight +transient +url + diff --git a/emacs/.config/emacs/early-init.el b/emacs/.config/emacs/early-init.el new file mode 100644 index 0000000..39ed48b --- /dev/null +++ b/emacs/.config/emacs/early-init.el @@ -0,0 +1,17 @@ +(setq package-enable-at-startup nil) +(setq straight-use-package-by-default +1) + +(defvar bootstrap-version) +(let ((bootstrap-file + (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) + (bootstrap-version 5)) + (unless (file-exists-p bootstrap-file) + (with-current-buffer + (url-retrieve-synchronously + "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" + 'silent 'inhibit-cookies) + (goto-char (point-max)) + (eval-print-last-sexp))) + (load bootstrap-file nil 'nomessage)) + +(straight-use-package 'use-package) diff --git a/emacs/.config/emacs/init.el b/emacs/.config/emacs/init.el new file mode 100644 index 0000000..3398f9d --- /dev/null +++ b/emacs/.config/emacs/init.el @@ -0,0 +1,2 @@ +(use-package magit) + diff --git a/systemd/.config/systemd/user/emacs@.service b/systemd/.config/systemd/user/emacs@.service new file mode 100644 index 0000000..4707559 --- /dev/null +++ b/systemd/.config/systemd/user/emacs@.service @@ -0,0 +1,12 @@ +[Unit] +Description=Emacs + +[Service] +Type=forking +ExecStart=/usr/bin/emacs --daemon=%i --chdir %h +ExecStop=/usr/bin/emacsclient --server-file=hud --eval "(progn (setq kill-emacs-hook 'nil) (kill-emacs))" +Restart=always +TimeoutStartSec=0 + +[Install] +WantedBy=default.target