diff options
author | dx <aryadevchavali1@gmail.com> | 2020-06-11 20:47:05 +0100 |
---|---|---|
committer | dx <aryadevchavali1@gmail.com> | 2020-06-11 20:47:05 +0100 |
commit | 93326421fee7b7395c8828a8e10bba10b80630db (patch) | |
tree | 88729c813b5c2f73e5934a7bd2d15910d8f6434c | |
parent | 08a115e78df54604b1167b42140efbdf9d641289 (diff) | |
download | dotfiles-93326421fee7b7395c8828a8e10bba10b80630db.tar.gz dotfiles-93326421fee7b7395c8828a8e10bba10b80630db.tar.bz2 dotfiles-93326421fee7b7395c8828a8e10bba10b80630db.zip |
~org config into config.el
As a precursor, define some functions and variables to load up org files
in org/*. Easy setup and usage.
-rw-r--r-- | Doom/.doom.d/config.el | 19 | ||||
-rw-r--r-- | Doom/.doom.d/org/config.org | 13 |
2 files changed, 19 insertions, 13 deletions
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) diff --git a/Doom/.doom.d/org/config.org b/Doom/.doom.d/org/config.org index b5e3db2..17da87f 100644 --- a/Doom/.doom.d/org/config.org +++ b/Doom/.doom.d/org/config.org @@ -8,18 +8,7 @@ - Use it for most of my code editing and development needs. - Incredibly versatile tool in my inventory. - Has me like this half the time (╯°□°)╯┻━┻ -* Init -Initialize literate config and setup some basic variables -** Bootstrap -Declare variable for org files I want to compile -#+BEGIN_SRC elisp -(defvar dx:literate/org-files '("personal.org")) -#+END_SRC - -Then just iterate and load them via =org-babel-load-file=. -#+BEGIN_SRC elisp -(cl-loop for file in dx:literate/org-files do (org-babel-load-file (concat doom-private-dir "org/" file) t)) -#+END_SRC +* Initial setup ** Doom Variables - Set the doom localleader to "," because it's faster - Using the font [[https://sourcefoundry.org/hack/][Hack]] |