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

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

[elpa] externals/org 200d168275 1/2: Merge branch 'bugfix'


From: ELPA Syncer
Subject: [elpa] externals/org 200d168275 1/2: Merge branch 'bugfix'
Date: Thu, 22 Jun 2023 06:58:22 -0400 (EDT)

branch: externals/org
commit 200d1682752520584196e5229f0c901316c31c76
Merge: c8c8e3326d 79ec91584c
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    Merge branch 'bugfix'
---
 lisp/ob-tangle.el              |  2 +-
 testing/lisp/test-ob-tangle.el | 17 +++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index 980d4a1205..e63bde89f9 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -571,7 +571,7 @@ non-nil, return the full association list to be used by
              (max (condition-case nil
                       (save-excursion
                         (org-back-to-heading t) ; Sets match data
-                        (match-end 0))
+                        (re-search-forward org-outline-regexp))
                     (error (point-min)))
                   (save-excursion
                     (if (re-search-backward
diff --git a/testing/lisp/test-ob-tangle.el b/testing/lisp/test-ob-tangle.el
index 496f01bb76..4b7a574cba 100644
--- a/testing/lisp/test-ob-tangle.el
+++ b/testing/lisp/test-ob-tangle.el
@@ -99,6 +99,23 @@ echo 1
                                    (buffer-string)))
         (delete-file "test-ob-tangle.sh"))))))
 
+(ert-deftest ob-tangle/comment-org ()
+  "Test :commends org."
+  (should
+   (string-match
+    (regexp-quote ";; Function heading")
+    (org-test-with-temp-text-in-file
+        "* Function heading
+
+  #+begin_src elisp :tangle \"test-ob-tange.el\" :comments org
+    (message \"FOO\")
+  #+end_src"
+      (unwind-protect
+          (progn (org-babel-tangle)
+                 (with-temp-buffer (insert-file-contents "test-ob-tange.el")
+                                   (buffer-string)))
+        (delete-file "test-ob-tange.el"))))))
+
 (ert-deftest ob-tangle/comment-links-numbering ()
   "Test numbering of source blocks when commenting with links."
   (should



reply via email to

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