summaryrefslogtreecommitdiffstats
path: root/emacs/.emacs.d/org/intro.org
blob: 16b0bd003a4bf04c41ea5118073abeaeae412db9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#+STARTUP: showall

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

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

* Preparation

  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:

  #+BEGIN_SRC makefile
    %.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\")
  #+END_SRC

  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 it's 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've 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.

* The ~depends-on~ snippets

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

  #+BEGIN_SRC emacs-lisp :tangle no
    (depends-on "somepackage")
  #+END_SRC

  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:

  - [[http://sachac.github.io/.emacs.d/Sacha.html][Sacha Chua]]
  - [[http://www.wisdomandwonder.com/wordpress/wp-content/uploads/2014/03/C3F.html][Grant Rettke]]
  - [[https://github.com/wasamasa/dotemacs][Vasilij Schneidermann]]