summaryrefslogtreecommitdiffstats
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Tom Willemse2015-09-22 22:11:52 +0200
committerGravatar Tom Willemse2015-09-22 22:11:52 +0200
commit46bda5a885c9c25a3d049de2219fc2e816cfd6cf (patch)
tree03f0b748df426cbc85423aed44ce6a83cf5c643e /emacs
parente28a4eb2b0eff60e7f4755d20f5175c95bc9c369 (diff)
downloaddotfiles-46bda5a885c9c25a3d049de2219fc2e816cfd6cf.tar.gz
dotfiles-46bda5a885c9c25a3d049de2219fc2e816cfd6cf.zip
Add preparation chapter to Emacs initialization
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init.org9
-rw-r--r--emacs/.emacs.d/org/preparation.org43
2 files changed, 45 insertions, 7 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index 138ea02..98b8778 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -9,14 +9,9 @@
#+INCLUDE: "org/intro.org" :minlevel 2
-* Use lexical binding
+* Preparation
- For some of these functions, and general coolness, lexical binding
- is a must. Without it, closures cannot be made.
-
- #+BEGIN_SRC emacs-lisp :padline no
- ;; -*- lexical-binding: t -*-
- #+END_SRC
+#+INCLUDE: "org/preparation.org" :minlevel 2
* Some general-purpose functions and macros
diff --git a/emacs/.emacs.d/org/preparation.org b/emacs/.emacs.d/org/preparation.org
new file mode 100644
index 0000000..4baffc6
--- /dev/null
+++ b/emacs/.emacs.d/org/preparation.org
@@ -0,0 +1,43 @@
+#+STARTUP: showall
+
+Some things have to be done to make sure that everything works as it
+should. This includes enabling lexical binding, loading Cask and
+keeping some comments.
+
+* Use lexical binding
+
+ For some of my functions, and general coolness, lexical binding is a
+ must. Without it, closures cannot be made for example.
+
+ #+BEGIN_SRC emacs-lisp :padline no
+ ;; -*- lexical-binding: t -*-
+ #+END_SRC
+
+ This line needs to appear at the beginning of the file to work. Just
+ to keep things looking nice I put it at the beginning of the file.
+
+* Keep package.el from changing my init
+
+ Some time ago my init file was changed by Emacs. It added a single
+ line of code and some explanatory comments. Apparently I need to
+ keep this comment in my initialization file so that Emacs doesn't
+ try to add the code again. I actually use [[http://cask.readthedocs.org/en/latest/][Cask]] to manage and load my
+ packages so I don't need this.
+
+ #+BEGIN_SRC emacs-lisp
+ ;; (package-initialize)
+ #+END_SRC
+
+* Load Cask
+
+ I use Cask to manage my installed packages and for that to work I
+ need to load Cask at the start of the initialization file. This
+ should be executed both when byte-compiling and loading at run-time
+ so that other bits and pieces can byte-compile without warnings or
+ errors.
+
+ #+BEGIN_SRC emacs-lisp
+ (eval-and-compile
+ (require 'cask "~/projects/ext/cask/cask.el")
+ (cask-initialize))
+ #+END_SRC