org-confirm-babel-evaluate = nil while tangling

This commit is contained in:
Henrik Lissner 2021-03-22 01:40:18 -04:00
parent 4bab5a948a
commit 18e1795a98
2 changed files with 6 additions and 2 deletions

View file

@ -145,7 +145,7 @@ trees with the :notangle: tag."
(let ((backup (make-temp-file (file-name-base file) nil ".backup.org"))) (let ((backup (make-temp-file (file-name-base file) nil ".backup.org")))
(unwind-protect (unwind-protect
;; Prevent slow hooks from interfering ;; Prevent slow hooks from interfering
(let (org-mode-hook) (let (org-mode-hook org-confirm-babel-evaluate)
;; We do the ol' switcheroo because `org-babel-tangle' writes ;; We do the ol' switcheroo because `org-babel-tangle' writes
;; changes to the current file, which would be imposing on the user. ;; changes to the current file, which would be imposing on the user.
(copy-file file backup t) (copy-file file backup t)

View file

@ -61,7 +61,11 @@ byte-compiled from.")
;; Prevent infinite recursion due to recompile-on-save ;; Prevent infinite recursion due to recompile-on-save
;; hooks later, and speed up `org-mode' init. ;; hooks later, and speed up `org-mode' init.
(org-mode-hook nil) (org-mode-hook nil)
(org-inhibit-startup t)) (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))
(org-mode) (org-mode)
(with-silent-modifications (with-silent-modifications
;; Tangling won't ordinarily expand #+INCLUDE directives, ;; Tangling won't ordinarily expand #+INCLUDE directives,