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

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

[elpa] externals-release/org 7ec9e37: org-tree-to-indirect-buffer: Fix w


From: ELPA Syncer
Subject: [elpa] externals-release/org 7ec9e37: org-tree-to-indirect-buffer: Fix when last headline is empty at point-max
Date: Thu, 16 Dec 2021 08:57:30 -0500 (EST)

branch: externals-release/org
commit 7ec9e371177909f4af8b6d3c073a9dd5e3a39d18
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>

    org-tree-to-indirect-buffer: Fix when last headline is empty at point-max
    
    * lisp/org.el (org-tree-to-indirect-buffer): Consider scenario when
    `org-end-of-subtree' with 't second arg moves to `point-max' at the
    end of an empty headline.  We do not need to move back the point then.
    
    Fixes 
https://orgmode.org/list/CA+AFVDUF3RzA-mnoAp8yFv-bppoYJfJo=Wa8qmNQhV-tfHHB+w@mail.gmail.com
---
 lisp/org.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index 00bbc07..f784369 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6905,7 +6905,7 @@ frame is not changed."
       (setq beg (point)
            heading (org-get-heading 'no-tags))
       (org-end-of-subtree t t)
-      (when (org-at-heading-p) (backward-char 1))
+      (when (and (not (eobp)) (org-at-heading-p)) (backward-char 1))
       (setq end (point)))
     (when (and (buffer-live-p org-last-indirect-buffer)
               (not (eq org-indirect-buffer-display 'new-frame))



reply via email to

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