[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org cc3df3a 3/4: org--backward-paragraph-once: Fix infi
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org cc3df3a 3/4: org--backward-paragraph-once: Fix infinite loop at first element in section |
Date: |
Wed, 27 Oct 2021 11:57:34 -0400 (EDT) |
branch: externals/org
commit cc3df3af2ae9081c1ba08dd80e068b60ad76dda3
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
org--backward-paragraph-once: Fix infinite loop at first element in section
* lisp/org.el (org--backward-paragraph-once): Do not consider section
parent as greater element. section elements starts at the same point
with its first child and we do not want to "move" from beginning of
child to the beginning of the section.
Fixes https://list.orgmode.org/87cznsnql6.fsf@localhost/T/#t
---
lisp/org.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/org.el b/lisp/org.el
index 1f90bf0..4c41f60 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -21399,7 +21399,9 @@ See `org-backward-paragraph'."
(forward-line -1))
;; At the beginning of the first element within a greater
;; element. Move to the beginning of the greater element.
- ((and parent (= begin (org-element-property :contents-begin parent)))
+ ((and parent
+ (not (eq 'section (org-element-type parent)))
+ (= begin (org-element-property :contents-begin parent)))
(funcall reach (org-element-property :begin parent)))
;; Since we have to move anyway, find the beginning
;; position of the element above.