maxi-k / .emacs.d

My emacs settings

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

My emacs settings

Disclaimer

This README is mostly a note for myself, but someone else might find it useful.

There’s probably some unnecessary stuff in here.

The custom file, packages, backup files, and persistent data are all excluded.

Both the gui- and terminal versions are working, though some keybindings won’t be usable in the terminal.

The settings are optimized for the standard US Mac keyboard.

Org-mode config files?

I was inspired by Howard Abrams excellent video “Literate DevOps” to convert my configuration files to org-mode files where the actual setup code is embedded in code-blocks, which is surrounded by explanation.

The commentary is still very sparse, which I will change over time.

When first starting emacs after cloning the repo, the elisp files will be automatically generated from the org-files, and stored in user/elisp. They are then byte-compiled, and the original .el files deleted.

To do that again, run this provided command:

;; C-u M-x emacs-config-compile RET
(emacs-config-compile t)

If the first argument (= prefix argument) is non-nil, the whole elisp folder will be deleted and recreated first.

Writing configuration files

I use a slightly different approach to Howard Abrams - his can be found in his dot-files available on github:

Emacs org configuration files must have the following property set:

#+PROPERTY: my-file-type emacs-config

This string is stored in the variable emacs-config-marker

There is a org-mode safe-hook which checks for the presence of this property. If it’s there, the File will automatically be byte-compiled on save and stored in the user/elisp directory. The org-file does not have to be in the .emacs.d directory for that to happen.

However, for the emacs-config-compile command to work (which is used to compile all configuration files at once), the configuration file has to be in .emacs.d/user.

All of the code doing this can be found in user/user-init.el, which is the only emacs-lisp file in that directory.

About

My emacs settings


Languages

Language:Emacs Lisp 96.1%Language:YASnippet 3.9%