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

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

[elpa] externals/org 0e4874f17c: org-up-element: Fix jumping up from inl


From: ELPA Syncer
Subject: [elpa] externals/org 0e4874f17c: org-up-element: Fix jumping up from inlinetask
Date: Wed, 12 Oct 2022 23:57:50 -0400 (EDT)

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

    org-up-element: Fix jumping up from inlinetask
    
    * lisp/org.el (org-up-element): Do not assume that
    `org-back-to-heading' skips inlinetasks.  Avoid that `if' branch by
    skipping over section parents.
    
    Reported-by: Michael Dauer <mick.dauer@gmail.com>
    Link: 
https://orgmode.org/list/CAP7OBxKKeuK_uH46SyEqQbsuBsE=XPkB=ks1TkCZTwyPZ40KaA@mail.gmail.com
---
 lisp/org.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index 36993e165f..9bf7dac1a8 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -20949,8 +20949,11 @@ Move to the previous element at the same level, when 
possible."
       (unless (org-up-heading-safe) (user-error "No surrounding element"))
     (let* ((elem (org-element-at-point))
           (parent (org-element-property :parent elem)))
+      ;; Skip sections
+      (when (eq 'section (org-element-type parent))
+        (setq parent (org-element-property :parent parent)))
       (if (and parent
-               (not (memq (org-element-type parent) '(section org-data))))
+               (not (eq (org-element-type parent) 'org-data)))
           (goto-char (org-element-property :begin parent))
        (if (org-with-limited-levels (org-before-first-heading-p))
            (user-error "No surrounding element")



reply via email to

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