emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/org-auto-tangle 8fb0fdbe2a 4/6: Merge pull request #18 fro


From: ELPA Syncer
Subject: [nongnu] elpa/org-auto-tangle 8fb0fdbe2a 4/6: Merge pull request #18 from davisrichard437/master
Date: Thu, 30 Jun 2022 07:58:49 -0400 (EDT)

branch: elpa/org-auto-tangle
commit 8fb0fdbe2ab91a9858a9126f8fc9867075688cb1
Merge: 87b867b46e 29b1d7d533
Author: lispy-dobby <yilkalargawworkneh@gmail.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #18 from davisrichard437/master
    
    Read org-src-preserve-indentation when tangling.
---
 org-auto-tangle.el | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/org-auto-tangle.el b/org-auto-tangle.el
index 0c1002d2eb..8c2f304911 100644
--- a/org-auto-tangle.el
+++ b/org-auto-tangle.el
@@ -79,15 +79,18 @@ for a specific file, add its full path to this list.")
   (async-start
    (let ((args (list file)))
      `(lambda ()
-       (require 'org)
-       (let ((start-time (current-time))
-             (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))))))
+        (require 'org)
+        (let ((start-time (current-time))
+              (non-essential t)
+              (org-confirm-babel-evaluate (not (member ,file 
',org-auto-tangle-babel-safelist)))
+              (org-src-preserve-indentation ,org-src-preserve-indentation)
+              (org-babel-pre-tangle-hook ,org-babel-pre-tangle-hook)
+              (org-babel-post-tangle-hook ,org-babel-post-tangle-hook)))
+          (apply #'org-babel-tangle-file ',args)
+          (format "%.2f" (float-time (time-since start-time))))))
    (let ((message-string (format "Tangling %S completed after" file)))
      `(lambda (tangle-time)
-       (message "%s %s seconds",message-string tangle-time)))))
+        (message "%s %s seconds",message-string tangle-time)))))
 
 (defun org-auto-tangle-tangle-if-needed ()
   "Call org-auto-tangle-async if needed.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]