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

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

[elpa] externals/org d8a1f34 2/4: org-element--current-element: Use expl


From: ELPA Syncer
Subject: [elpa] externals/org d8a1f34 2/4: org-element--current-element: Use explicit regexp to match headline
Date: Tue, 30 Nov 2021 07:57:26 -0500 (EST)

branch: externals/org
commit d8a1f34cf6ac55648181ca97e86231208112afc4
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>

    org-element--current-element: Use explicit regexp to match headline
    
    * lisp/org-element.el (org-element--current-element): Do not call
    `org-at-heading-p' to determine if we are at headline element.
    `org-at-heading-p' calls `beginning-of-line' and may match
    non-headlines as headlines.
---
 lisp/org-element.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index 4543e30..0b4dd22 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -4191,7 +4191,7 @@ element it has to parse."
             ;; Node Property.
             ((eq mode 'node-property) (org-element-node-property-parser limit))
             ;; Headline.
-            ((org-with-limited-levels (org-at-heading-p))
+            ((org-with-limited-levels (looking-at-p org-outline-regexp-bol))
              (org-element-headline-parser limit raw-secondary-p))
             ;; Sections (must be checked after headline).
             ((eq mode 'section) (org-element-section-parser limit))



reply via email to

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