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

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

[elpa] externals/org 7c549f4841 060/101: org-babel-tangle-collect-blocks


From: ELPA Syncer
Subject: [elpa] externals/org 7c549f4841 060/101: org-babel-tangle-collect-blocks: Switch to org-element API
Date: Sat, 1 Jul 2023 09:59:13 -0400 (EDT)

branch: externals/org
commit 7c549f48419e62b1bd35208d5744df64de8a2dd0
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    org-babel-tangle-collect-blocks: Switch to org-element API
---
 lisp/ob-tangle.el | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index b2b9e44702..5c912e357e 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -458,14 +458,11 @@ code blocks by target file."
   (let ((counter 0) last-heading-pos blocks)
     (org-babel-map-src-blocks (buffer-file-name)
       (let ((current-heading-pos
-             (if (org-element--cache-active-p)
-                 (or (org-element-begin
-                      (org-element-lineage
-                       (org-element-at-point)
-                       'headline t))
-                     1)
-              (org-with-wide-buffer
-               (org-with-limited-levels (outline-previous-heading))))))
+             (or (org-element-begin
+                  (org-element-lineage
+                   (org-element-at-point)
+                   'headline t))
+                 1)))
        (if (eq last-heading-pos current-heading-pos) (cl-incf counter)
          (setq counter 1)
          (setq last-heading-pos current-heading-pos)))



reply via email to

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