Merge branch 'master' of git.ganneff.de:emacs
[emacs.git] / .emacs.d / init.el
1 ;; Added by Package.el. This must come before configurations of
2 ;; installed packages. Don't delete this line. If you don't want it,
3 ;; just comment it out by adding a semicolon to the start of the line.
4 ;; You may delete these explanatory comments.
5 (package-initialize)
6
7 ;; Ganneff's emacs config
8
9 ;; Emacs can not read its config directly from org-mode files.
10 ;; But as my config nearly completly is inside an org-mode file,
11 ;; emacs need to be told to deal with it.
12 ;; Meet org-tangle/org-babel-load-file, which extracts the emacs-lisp
13 ;; source parts of my config files, writes them into .el files
14 ;; and then lets emacs load those.
15
16 ;; That way I have a nice environment to edit and comment - and easily export
17 ;; to web or elsewhere - while emacs has its elisp. The initial run after
18 ;; a config change takes longer, but as that only happens when I change
19 ;; something in the .org files - I don't care.
20
21 ;; Go go go
22 (unless noninteractive
23 (message "Emacs is powering up... Be patient, Master %s!" (getenv "USER")))
24
25 ;; I like to see how long it takes to "boot" emacs (usually one or two
26 ;; seconds), so save the start time
27 (defvar emacs-load-start-time (current-time))
28
29 ;; Set a high number of lines for the message buffer so stuff doesn't "scroll out"
30 (setq message-log-max 16384)
31
32 ;; Set path to (my, recent) Org-Mode version
33 (add-to-list 'load-path (concat (file-name-directory (or load-file-name (buffer-file-name))) "elisp/org/"))
34
35 ;; org-mode can load modules when it loads itself, lets tell it which ones we want.
36 ; org-checklist
37 (setq org-modules (quote
38 (org-bbdb org-bibtex org-crypt org-docview org-gnus
39 org-id org-info org-habit org-inlinetask
40 org-irc org-protocol org-w3m org-mouse
41 org-notmuch icalendar)))
42
43 ;; And load org-mode
44 (require 'org)
45 ;; Without this the whole config can't load
46 (require 'ob-tangle)
47 ;; And finally, let org-babel do its work. All the rest of the emacs
48 ;; initialization comes from initjj.org
49 (org-babel-load-file (expand-file-name "initjj.org" (file-name-directory (or load-file-name (buffer-file-name)))))