make tangling of init.org more robust
This commit is contained in:
parent
6cc0a9871c
commit
bcf0d2b445
1 changed files with 9 additions and 10 deletions
|
@ -75,16 +75,15 @@
|
||||||
(use-package ob-tangle)
|
(use-package ob-tangle)
|
||||||
(let ((src (concat user-emacs-directory "init.org"))
|
(let ((src (concat user-emacs-directory "init.org"))
|
||||||
(tgt (concat user-emacs-directory "init.el")))
|
(tgt (concat user-emacs-directory "init.el")))
|
||||||
(if (file-newer-than-file-p src tgt)
|
(when (file-newer-than-file-p src tgt)
|
||||||
(progn
|
(delete-file tgt)
|
||||||
(message "init.org has been changed, tangling...")
|
|
||||||
(org-babel-tangle-file src tgt "emacs-lisp")
|
(org-babel-tangle-file src tgt "emacs-lisp")
|
||||||
;; this is a good time to check if the crafted-emacs repo is fresh
|
;; this is a good time to check if the crafted-emacs repo is fresh
|
||||||
;; - we just updated the init.org file so we expect changes.
|
;; - we just updated the init.org file so we expect changes.
|
||||||
;; - or this is the initial tangling and we need the repo to exist.
|
;; - or this is the initial tangling and we need the repo to exist.
|
||||||
(message "checking crafted emacs repo...")
|
(message "checking crafted emacs repo...")
|
||||||
(check-crafted-emacs-fresh-repo)
|
(check-crafted-emacs-fresh-repo)
|
||||||
)))
|
))
|
||||||
|
|
||||||
;; Configure Crafted Emacs
|
;; Configure Crafted Emacs
|
||||||
(setq crafted-package-system 'elpaca)
|
(setq crafted-package-system 'elpaca)
|
||||||
|
|
Loading…
Reference in a new issue