forked from jkitchin/scimax
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scimax-lob.el
30 lines (21 loc) · 854 Bytes
/
scimax-lob.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
;;; scimax-lob.el --- Library of babel for scimax
;;; Commentary:
;; This was motivated by the work described at
;; http://kdr2.com/tech/emacs/1805-approach-org-ref-code-to-text.html. This
;; enables one to reuse code-blocks in org files more easily.
(require 'f)
(require 'cl-lib)
(defvar scimax-lob-directory (directory-file-name (expand-file-name "scimax-lob" scimax-dir))
"Directory where library of babel org files reside.")
(unless (file-directory-p scimax-lob-directory)
(make-directory scimax-lob-directory t))
(defun scimax-load-lob ()
"Load the library of babel files."
(interactive)
(cl-loop for org-file in (f-entries scimax-lob-directory (lambda (f) (f-ext? f "org")) t)
do
(message "ingesting %s" org-file)
(org-babel-lob-ingest org-file)))
(scimax-load-lob)
(provide 'scimax-lob)
;;; scimax-lob.el ends here