legacy-dotfiles/emacs/.emacs.d/org/intro.org

2.5 KiB

Inspired by other such projects, here is my Emacs initialization file.

Note: This is not my entire Emacs initialization file. It's a work-in-progress.

Setup

I could use org-babel to load this file, but I don't like my initialization file being dependent on too many things, especially big things, and org is a big thing. It may be strange for you to read this, as I have placed my entire Emacs configuration in an org-mode file, but here are the make targets I use to tangle and subsequently byte-compile my init file:

  %.elc: %.el
      emacs -Q -batch -eval "(byte-compile-file \"$<\")"

  init.el: init.org
      emacs -Q -batch -l "ob-tangle" -eval "(org-babel-tangle-file \"init.org\")

Executing the second target (either through make, or manually) will get you my Emacs initialization file in plain Emacs Lisp.

Note: If you look at this file in its org-mode form you will notice that I actually tangle init.org into init2.el. This is a temporary measure so that I can gradually move my configuration from my existing init.el file into init.org without much trouble. Once I have emptied out my init.el I will instruct babel to tangle into init.el, this code already reflects that.

The oni: prefix

To keep my functions and variables from ever accidentally interfering with other packages or Emacs internal variables I prefix all the functions I write and variables I declare with oni:. You don't have to copy it if you copy anything from this file, as long as you do it consistently.

I sometimes forget to do this, though.

The depends-on snippets

At certain points in this document you will find bits of code that look like:

  (depends-on "somepackage")

These calls are from the Cask DSL. They specify that my configuration depends on some package found in one of the ELPA repositories I have setup.

These snippets don't belong in your init.el, but instead in a separate Cask file, and only if you use Cask, not if you just use the standard package.el.

Other such projects

As stated, this project is inspired and influenced by other literate configurations. Here is a list of some of the ones I've found: