ditch org for init, various improvements
[dot-emacs] / init.el
1 ;; Copyright (C) 2014 Ian Kelling
2
3 ;; This program is free software: you can redistribute it and/or modify
4 ;; it under the terms of the GNU General Public License as published by
5 ;; the Free Software Foundation, either version 3 of the License, or
6 ;; (at your option) any later version.
7
8 ;; This program is distributed in the hope that it will be useful,
9 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ;; GNU General Public License for more details.
12
13 ;; You should have received a copy of the GNU General Public License
14 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16
17 ;; do m-x benchmark-init to see some benchmark stats
18 ;;(add-to-list 'load-path "~/.emacs.d/src/benchmark-init-el/")
19 ;;(require 'benchmark-init-loaddefs)
20 ;;(benchmark-init/activate)
21
22
23 ;;; init.el --- the start of customization
24
25 ;; (toggle-debug-on-error) ;uncomment to help debug
26
27
28 ;; Package.el added this a long time ago. emacs 26 gives a warning that
29 ;; this is obsolete, but it doesn't happen automatically in batch mode,
30 ;; and then emacs dies on error, so it doesn't seem obsolete to me.
31
32
33 ;; stop from minimizing & freezing the gui
34 ;; used to freeze emacs and was really annoying,
35 ;; seems its changed now. no harm in keeping this though.
36 (global-unset-key (kbd "C-z"))
37
38 ;; these need to be done before the hook in order to satisfy the byte compiler or batch mode
39 (add-to-list 'load-path "~/.emacs.d/emacs/site-lisp/org")
40 (add-to-list 'load-path "~/.emacs.d/src/readline-complete")
41 (add-to-list 'load-path "~/.emacs.d/src/bbdb-csv-import")
42 (add-to-list 'load-path "~/.emacs.d/src/ghci-completion")
43 (add-to-list 'load-path "~/.emacs.d/src/mediawiki-el")
44 (add-to-list 'load-path "~/.emacs.d/src/spray")
45 (add-to-list 'load-path "~/.emacs.d/src/visible-mark")
46
47
48 ;; git version of gnus
49 ;; (add-to-list 'load-path "~/.emacs.d/src/gnus/lisp")
50 (require 'info)
51 (add-to-list 'Info-default-directory-list "~/.emacs.d/src/gnus/texi")
52
53 ;; needed for git version
54 ;;(add-to-list 'load-path "~/.emacs.d/src/haskell-mode")
55 ;;(require 'haskell-mode-autoloads)
56 ;;(add-to-list 'Info-default-directory-list "~/.emacs.d/src/haskell-mode")
57
58 ;; for using custom/upstream bbdb
59 ;;(require 'bbdb-loaddefs "~/.emacs.d/src/bbdb/lisp/bbdb-loaddefs.el")
60 ;;(setq bbdb-print-tex-path "~/.emacs.d/src/bbdb/tex")
61
62 ;;(add-hook 'server-visit-hook 'raise-frame)
63
64
65 ;; load init in `after-init-hook' so all packages are loaded
66 ;; todo, learn about the weird evaluation order of this hook that requires the quoting.
67 ;; adapted from starter-kit
68 (add-hook 'after-init-hook
69 `(lambda ()
70 ;; todo, set this var in my-init.org and use it instead
71 ;; of .emacs.d
72 (setq init-dir ,(file-name-directory load-file-name))
73 ;; previously, i was doing byte-recompile-directory, but
74 ;; now i just have one init file
75 (unless (equal (user-uid) 0) ; don't make root owned files
76 (byte-recompile-file (concat init-dir "myinit.el")))
77
78 (load-file (expand-file-name "myinit.el" init-dir))
79
80 ))
81
82 ;;init.el ends here