2020-01-06 18:45:26 +00:00
|
|
|
;;; -*- lexical-binding: t; -*-
|
|
|
|
|
2020-12-13 13:45:58 +00:00
|
|
|
;; If ~/.emacs.d/config/base.el exists, just load it. Otherwise,
|
|
|
|
;; first bootstrap Straight and load Org to make sure we end up with
|
|
|
|
;; the right Org version, then tangle ~/.emacs.d/init.org to
|
|
|
|
;; ~/.emacs.d/config/base.el
|
2020-01-07 20:07:05 +00:00
|
|
|
|
2021-02-20 11:40:03 +00:00
|
|
|
(defvar init-org-file (expand-file-name "~/.emacs.old/init.org"))
|
|
|
|
(defvar config-base-file (expand-file-name "~/.emacs.old/config/base.el"))
|
2020-10-01 18:11:16 +00:00
|
|
|
|
2021-02-20 11:40:03 +00:00
|
|
|
(when (not (file-exists-p "~/.emacs.old/config"))
|
|
|
|
(make-directory "~/.emacs.old/config"))
|
2020-10-01 18:11:16 +00:00
|
|
|
|
|
|
|
(when (not (file-exists-p config-base-file))
|
2020-08-21 17:11:52 +00:00
|
|
|
(message "Bootstrapping init file...")
|
|
|
|
(defvar bootstrapping-init t)
|
|
|
|
(defvar bootstrap-version)
|
|
|
|
(let ((bootstrap-file
|
|
|
|
(expand-file-name "straight/repos/straight.el/bootstrap.el"
|
|
|
|
user-emacs-directory))
|
|
|
|
(bootstrap-version 5))
|
|
|
|
(unless (file-exists-p bootstrap-file)
|
|
|
|
(with-current-buffer
|
|
|
|
(url-retrieve-synchronously
|
|
|
|
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
|
|
|
|
'silent 'inhibit-cookies)
|
|
|
|
(goto-char (point-max))
|
|
|
|
(eval-print-last-sexp)))
|
|
|
|
(load bootstrap-file nil 'nomessage))
|
2020-01-07 20:07:05 +00:00
|
|
|
|
2020-08-21 17:11:52 +00:00
|
|
|
(straight-use-package 'org-plus-contrib)
|
|
|
|
(require 'org)
|
2020-10-01 18:11:16 +00:00
|
|
|
(org-babel-tangle-file init-org-file))
|
2020-01-06 18:45:26 +00:00
|
|
|
|
2020-10-01 18:11:16 +00:00
|
|
|
(load-file config-base-file)
|