From 93326421fee7b7395c8828a8e10bba10b80630db Mon Sep 17 00:00:00 2001 From: dx Date: Thu, 11 Jun 2020 20:47:05 +0100 Subject: ~org config into config.el As a precursor, define some functions and variables to load up org files in org/*. Easy setup and usage. --- Doom/.doom.d/config.el | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'Doom/.doom.d/config.el') diff --git a/Doom/.doom.d/config.el b/Doom/.doom.d/config.el index a72fe68..ff9ee06 100644 --- a/Doom/.doom.d/config.el +++ b/Doom/.doom.d/config.el @@ -1,3 +1,20 @@ ;;; ~/Dotfiles/doom.d/config.el -*- lexical-binding: t; -*- -(org-babel-load-file (concat doom-private-dir "org/config.org") t) +(defvar +bootstrap/org-files '("config.org" "personal.org") "Org files to load relative to =doom-private-dir=/org/*") +(defvar +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) -- cgit v1.2.3-13-gbd6f