nit(cli): fix print-group! indentation

This commit is contained in:
Henrik Lissner
2024-11-13 07:22:41 -05:00
parent cb557319a9
commit 5e84709577
11 changed files with 432 additions and 234 deletions

View File

@ -20,40 +20,40 @@
(dest (expand-file-name dest)))
(print! (start "Tangling your literate config..."))
(print-group!
(let (;; Do as little unnecessary work as possible in these org files.
(org-startup-indented nil)
(org-startup-folded nil)
(vc-handled-backends nil)
;; Prevent unwanted entries in recentf, or formatters, or
;; anything that could be on these hooks, really. Nothing else
;; should be touching these files (particularly in interactive
;; sessions).
(write-file-functions nil)
(before-save-hook nil)
(after-save-hook nil)
;; Prevent infinite recursion due to recompile-on-save hooks
;; later, and speed up `org-mode' init.
(org-mode-hook nil)
(org-inhibit-startup t)
;; Allow evaluation of src blocks at tangle-time (would abort
;; them otherwise). This is a security hazard, but Doom will
;; trust that you know what you're doing!
(org-confirm-babel-evaluate nil)
;; Say a little more
(doom-print-message-level 'info))
(cond ((not (file-exists-p target))
(print! (warn "No org file at %s. Skipping...") (path target))
nil)
((with-temp-buffer
(insert-file-contents target)
(let ((case-fold-search t))
(not (re-search-forward "^ *#\\+begin_src e\\(?:macs-\\)?lisp" nil t))))
(print! (warn "No src blocks to tangle in %s. Skipping...") (path target))
nil)
((if-let (files (org-babel-tangle-file target dest))
(always (print! (success "Done tangling %d file(s)!" (length files))))
(print! (error "Failed to tangle any blocks from your config."))
nil))))))))
(let (;; Do as little unnecessary work as possible in these org files.
(org-startup-indented nil)
(org-startup-folded nil)
(vc-handled-backends nil)
;; Prevent unwanted entries in recentf, or formatters, or
;; anything that could be on these hooks, really. Nothing else
;; should be touching these files (particularly in interactive
;; sessions).
(write-file-functions nil)
(before-save-hook nil)
(after-save-hook nil)
;; Prevent infinite recursion due to recompile-on-save hooks
;; later, and speed up `org-mode' init.
(org-mode-hook nil)
(org-inhibit-startup t)
;; Allow evaluation of src blocks at tangle-time (would abort
;; them otherwise). This is a security hazard, but Doom will
;; trust that you know what you're doing!
(org-confirm-babel-evaluate nil)
;; Say a little more
(doom-print-message-level 'info))
(cond ((not (file-exists-p target))
(print! (warn "No org file at %s. Skipping...") (path target))
nil)
((with-temp-buffer
(insert-file-contents target)
(let ((case-fold-search t))
(not (re-search-forward "^ *#\\+begin_src e\\(?:macs-\\)?lisp" nil t))))
(print! (warn "No src blocks to tangle in %s. Skipping...") (path target))
nil)
((if-let (files (org-babel-tangle-file target dest))
(always (print! (success "Done tangling %d file(s)!" (length files))))
(print! (error "Failed to tangle any blocks from your config."))
nil))))))))
(defun +literate-tangle--sync ()
"Tangles `+literate-config-file' if it has changed."