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

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

[elpa] externals/org ced2b33: org-element--parse-to: Fix return value at


From: ELPA Syncer
Subject: [elpa] externals/org ced2b33: org-element--parse-to: Fix return value at the and of first section
Date: Thu, 4 Nov 2021 11:57:22 -0400 (EDT)

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

    org-element--parse-to: Fix return value at the and of first section
    
    * lisp/org-element.el (org-element--parse-to): Fix edge case when
    calling `org-element--parse-to' at contents end point of first
    section.  We need to return outermost element ending before point in
    such scenario.
    
    Fixes 
https://list.orgmode.org/01bc6137-200d-8e2d-fdd7-6aad8382c619@posteo.eu/T/#u
---
 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 a02d392..9e917c3 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -6415,7 +6415,7 @@ If you observe Emacs hangs frequently, please report this 
to Org mode mailing li
                                   ;; the headline section.
                                  (and (org-element--open-end-p element)
                                        (or (= (org-element-property :end 
element) (point-max))
-                                           (and (> pos (org-element-property 
:contents-end element))
+                                           (and (>= pos (org-element-property 
:contents-end element))
                                                 (memq (org-element-type 
element) '(org-data section headline)))))))
                     (goto-char (or next cbeg))
                     (setq mode (if next mode (org-element--next-mode mode type 
t))



reply via email to

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