[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-auto-tangle ad3c332f06 52/56: Merge pull request #13 f
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-auto-tangle ad3c332f06 52/56: Merge pull request #13 from fredericgiquel/babel-evaluation |
Date: |
Mon, 6 Jun 2022 11:58:55 -0400 (EDT) |
branch: elpa/org-auto-tangle
commit ad3c332f062b5830e88b2ab13287a096ae434657
Merge: 50292af50d bc129f881b
Author: lispy-dobby <yilkalargawworkneh@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #13 from fredericgiquel/babel-evaluation
Permit code block evaluation for files in safelist
---
org-auto-tangle.el | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/org-auto-tangle.el b/org-auto-tangle.el
index 95a8d0f684..554107a303 100644
--- a/org-auto-tangle.el
+++ b/org-auto-tangle.el
@@ -56,6 +56,13 @@ If nil (default), auto-tangle will only happen on buffers
with
the `#+auto_tangle: t' keyword. If t, auto-tangle will happen on
all Org buffers unless `#+auto_tangle: nil' is set.")
+(defvar org-auto-tangle-babel-safelist '()
+ "List of full path of files for which code blocks need to be evaluated.
+
+By default, code blocks are not evaluated during the auto-tangle to avoid
+possible code execution from unstrusted source. To enable code blocks
evaluation
+for a specific file, add its full path to this list.")
+
(defun org-auto-tangle-find-value (buffer)
"Search the `auto_tangle' property in BUFFER and extracts it when found."
(with-current-buffer buffer
@@ -74,7 +81,8 @@ all Org buffers unless `#+auto_tangle: nil' is set.")
`(lambda ()
(require 'org)
(let ((start-time (current-time))
- (non-essential t))
+ (non-essential t)
+ (org-confirm-babel-evaluate (not (member ,file
',org-auto-tangle-babel-safelist))))
(apply #'org-babel-tangle-file ',args)
(format "%.2f" (float-time (time-since start-time))))))
(let ((message-string (format "Tangling %S completed after" file)))
- [nongnu] elpa/org-auto-tangle dc7eb11e6a 45/56: Merge pull request #7 from zzamboni/master, (continued)
- [nongnu] elpa/org-auto-tangle dc7eb11e6a 45/56: Merge pull request #7 from zzamboni/master, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 5d9f2734c9 54/56: Update License.org, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle cedd4dc41f 46/56: Update org-auto-tangle.el, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 6c0786d863 14/56: modified the readme to reflect the changes, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 70e5e3d131 13/56: move the whole thing into a minor mode, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 2e97156230 32/56: Merge pull request #2 from kamoii/patch-1, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle be9007a23a 43/56: corrected the arguments to org-auto-tangle-find-value function call, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle cebc4bbf73 44/56: Improve auto_tangle regex, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 50292af50d 50/56: Merge pull request #10 from juergenhoetzel/non-essential, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle aa6afc302f 49/56: Prevent Tramp from prompting for user passwords, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle ad3c332f06 52/56: Merge pull request #13 from fredericgiquel/babel-evaluation,
ELPA Syncer <=
- [nongnu] elpa/org-auto-tangle 8883015f00 09/56: fixed Emacs references by using M-x-checkdoc, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 15884227bb 16/56: got it working again by moving the hook to inner block, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle b9c28533ee 21/56: added a remove-hook if org-auto-tangle-mode is nil, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle c593c5d028 28/56: added local to remove hook, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 7e9842f1cb 24/56: Update README.org, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle c3cbde261f 56/56: Merge pull request #17 from RampedIndent/patch-1, ELPA Syncer, 2022/06/06
- [nongnu] elpa/org-auto-tangle 13aaef275f 42/56: Merge pull request #5 from zzamboni/org-auto-tangle-default, ELPA Syncer, 2022/06/06