forked from otfrom/otfrom-org-emacs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.el
executable file
·58 lines (47 loc) · 1.91 KB
/
init.el
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
;;; package --- Summary
;;; Commentary:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; This a is the minimal config needed to get org-mode from melpa and
;; get it up and running so that we can load our emacs config from a
;; .org file in a literate manner. The basis for this can be found
;; here:
;;
;; http://orgmode.org/worg/org-contrib/babel/intro.html
;;(add-to-list 'load-path "/home/chris/benchmark-init-el/")
;;(require 'benchmark-init-loaddefs)
;;(benchmark-init/activate)
(require 'package)
;;; Code:
(setq package-archives '(;;("marmalade" . "http://marmalade-repo.org/packages/")
("melpa-stable" . "http://stable.melpa.org/packages/")
("melpa" . "http://melpa.org/packages/")
("gnu" . "http://elpa.gnu.org/packages/")))
(setq load-prefer-newer t)
;; This means we prefer things from ~/.emacs.d/elpa over the standard packages.
(package-initialize)
(when (not (package-installed-p 'auto-compile))
(package-install 'auto-compile))
(require 'auto-compile)
(auto-compile-on-load-mode)
(auto-compile-on-save-mode)
;; This bootstraps us if we don't have anything
(when (not package-archive-contents)
(package-refresh-contents))
(when (not (package-installed-p 'use-package))
(package-refresh-contents)
(package-install 'use-package))
;; This installs elpa packages if we haven't done that yet
(defun maybe-install-and-require (p)
"Install elpa packages if not already installed.
p (as P): package to be installed."
(when (not (package-installed-p p))
(package-install p))
(require p))
(defvar native-comp-deferred-compilation-deny-list nil)
;; org-mode always needs to be installed in an emacs where it isn't loaded.
;; (when (not (package-installed-p 'gnu))
;; (package-install 'org))
(require 'org)
(org-babel-load-file (concat user-emacs-directory "org/config.org"))
(provide 'init)
;;; init.el ends here