Emacs Configuration

img

Introduction

After a couple of years using Spacemacs and a failed attempt at switching to DoomEmacs, I’m finally switching back to a vanilla configuration! Why? Because I got tired of the framework getting in my way when I wanted to do stuff. I’m sure this is more applicable to Spacemacs than DoomEmacs since the latter has nice macros written to easily add new packages and configure them, such as package!, after!, and others. But ultimately, I wanted to have a system I designed entirely, with the keybinds I want, the packages I want.

Also, why Emacs? You know this famous quote:

Emacs is a great operating system, it just lacks a good text editor.

It’s actually pretty true in my opinion. Emacs is basically a Lisp machine with a default text editor, programmed with EmacsLisp, a general-purpose programming language. Therefore, if you want to do something in Emacs, with enough Elisp you can do it — if it’s not in Emacs already, that is.

img

A Warning Before You Proceed

This configuration makes heavy use of the nowebopen in new window syntax. This means if you encounter some code that looks <<like-this>>, org-mode will replace this snippet with another code snippet declared elsewhere in my configuration. If you see some code that looks <<like-this()>>, some generating code will run and replace this piece of text with the text generated. A quick example:

(defun hello ()
  <<generate-docstring()>>
  <<print-hello>>)

Will instead appear as

(defun hello ()
  "Print \"Hello World!\" in the minibuffer."
  (message "Hello World!"))

This is because I have the block of code below named generate-docstring which generates an output, which replaces its noweb tag. You can recognize noweb snippets generating code with the parenthesis. Often, such blocks aren’t visible in my HTML exports, but you can still see them if you open the actual org source file.

(concat "\""
        "Print \\\"Hello World!\\\" in the minibuffer."
        "\"")

On the other hand, noweb snippets without parenthesis simply replace the snippet with the equivalent named code block. For instance the one below is named print-hello and is placed as-is in the target source block.

(message "Hello World!")

Loading All Configuration Modules

Module NameConfig Page
basic-config.elBasic Configuration
custom-elisp.elCustom Elisp
package-manager.elPackage Manager
keybinding-managemers.elKeybinding Managers
applications.elPackages — Applications
autocompletion.elPackages — Autocompletion
editing.elPackages — Editing
emacs-builtin.elPackages — Emacs Built-ins
exwm.elPackages — EXWM
helpful.elPackages — Making My Life Easier
latex.elPackages — LaTeX
misc.elPackages — Misc
org.elPackages — Org Mode
programming.elPackages — Programming
visual-config.elPackages — Visual Configuration
keybindings.elKeybindings
(dolist (module '("basic-config.el" "custom-elisp.el" "package-manager.el" "keybinding-managemers.el" "applications.el" "autocompletion.el" "editing.el" "emacs-builtin.el" "exwm.el" "helpful.el" "latex.el" "misc.el" "org.el" "programming.el" "visual-config.el" "keybindings.el"))
  (load (expand-file-name module
                          (expand-file-name "lisp" user-emacs-directory))))