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

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

[nongnu] elpa/org-auto-tangle cebc4bbf73 44/56: Improve auto_tangle rege


From: ELPA Syncer
Subject: [nongnu] elpa/org-auto-tangle cebc4bbf73 44/56: Improve auto_tangle regex
Date: Mon, 6 Jun 2022 11:58:54 -0400 (EDT)

branch: elpa/org-auto-tangle
commit cebc4bbf738fe877a8f1908d855e4536eb8a31a2
Author: Diego Zamboni <diego@zzamboni.org>
Commit: Diego Zamboni <diego@zzamboni.org>

    Improve auto_tangle regex
    
    Use org-make-options-regexp instead of a handcrafted regexp, which
    results in more robust matching (e.g. supports options not starting on
    the first column).
---
 org-auto-tangle.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/org-auto-tangle.el b/org-auto-tangle.el
index 79eaf9806f..e12c1ccea9 100644
--- a/org-auto-tangle.el
+++ b/org-auto-tangle.el
@@ -62,8 +62,8 @@ all Org buffers unless `#+auto_tangle: nil' is set.")
       (widen)
       (save-excursion
        (goto-char (point-min))
-       (when (re-search-forward "^#\\+auto_tangle: \\(.*\\)" nil :noerror)
-         (match-string 1))))))
+       (when (re-search-forward (org-make-options-regexp '("auto_tangle")) nil 
:noerror)
+         (match-string 2))))))
 
 (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]