aboutsummaryrefslogtreecommitdiff
path: root/Doom/.doom.d/config.el
blob: dd54d9a439c803f48e86a4f86ff2353105f5b0e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
;;; ~/Dotfiles/doom.d/config.el -*- lexical-binding: t; -*-

(defconst +bootstrap/org-files '("config.org" "personal.org") "Org files to load relative to =doom-private-dir=/org/*")
(defconst +bootstrap/byte-compile t "Byte compile org files")

(defun +bootstrap/apply-files (babel-func)
  "Apply babel-func to a transformed list of org-files"
  (cl-map nil #'(lambda (file) (funcall babel-func (expand-file-name (concat doom-private-dir "org/" file)))) +bootstrap/org-files))

(defun +bootstrap/load-files ()
  "Load org files into current Emacs session via =org-babel-load-file="
  (interactive)
  (+bootstrap/apply-files #'org-babel-load-file))

(defun +bootstrap/compile-files ()
  "Compile org files via =org-babel-tangle-file="
  (interactive)
  (+bootstrap/apply-files #'org-babel-tangle-file))

(+bootstrap/load-files)