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

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

[nongnu] elpa/org-auto-tangle f1898c3d79 41/56: reverted the change to o


From: ELPA Syncer
Subject: [nongnu] elpa/org-auto-tangle f1898c3d79 41/56: reverted the change to org-auto-tangle-find-value
Date: Mon, 6 Jun 2022 11:58:54 -0400 (EDT)

branch: elpa/org-auto-tangle
commit f1898c3d79555cdf27b82a75b065a297b0bd07ad
Author: lispy-dobby <yilkalargawworkneh@gmail.com>
Commit: GitHub <noreply@github.com>

    reverted the change to org-auto-tangle-find-value
---
 org-auto-tangle.el | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/org-auto-tangle.el b/org-auto-tangle.el
index c15bad7b9c..a6a6fdf9a5 100644
--- a/org-auto-tangle.el
+++ b/org-auto-tangle.el
@@ -55,9 +55,15 @@ 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.")
 
-(defun org-auto-tangle-find-value ()
-  "Search the `auto_tangle' property in the current buffer and extracts it 
when found."
-  (cadar (org-collect-keywords '("auto_tangle"))))
+(defun org-auto-tangle-find-value (buffer)
+  "Search the `auto_tangle' property in BUFFER and extracts it when found."
+  (with-current-buffer buffer
+    (save-restriction
+      (widen)
+      (save-excursion
+       (goto-char (point-min))
+       (when (re-search-forward "^#\\+auto_tangle: \\(.*\\)" nil :noerror)
+         (match-string 1))))))
 
 (defun org-auto-tangle-async (file)
   "Invoke `org-babel-tangle-file' asynchronously on FILE."



reply via email to

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