From 18e1795a98b64b4cfcfd46418ea8ee33fb96fec5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 22 Mar 2021 01:40:18 -0400 Subject: [PATCH] org-confirm-babel-evaluate = nil while tangling --- bin/org-tangle | 2 +- modules/config/literate/autoload.el | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/org-tangle b/bin/org-tangle index b27084cb2..467ecf0b4 100755 --- a/bin/org-tangle +++ b/bin/org-tangle @@ -145,7 +145,7 @@ trees with the :notangle: tag." (let ((backup (make-temp-file (file-name-base file) nil ".backup.org"))) (unwind-protect ;; 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 ;; changes to the current file, which would be imposing on the user. (copy-file file backup t) diff --git a/modules/config/literate/autoload.el b/modules/config/literate/autoload.el index 85bc0e9ed..9a973187f 100644 --- a/modules/config/literate/autoload.el +++ b/modules/config/literate/autoload.el @@ -61,7 +61,11 @@ byte-compiled from.") ;; Prevent infinite recursion due to recompile-on-save ;; hooks later, and speed up `org-mode' init. (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) (with-silent-modifications ;; Tangling won't ordinarily expand #+INCLUDE directives,