Use `org-flag-subtree' instead of `outline-hide-subtree'
* lisp/org-agenda.el (org-agenda-show-1): * lisp/org-archive.el (org-archive-to-archive-sibling): * lisp/org-crypt.el (org-encrypt-entry): * lisp/org-feed.el (org-feed-update): * lisp/org.el (org-set-visibility-according-to-property): (org-move-subtree-down): (org-paste-subtree): (org-yank-generic): * testing/lisp/test-org-inlinetask.el (test-org-inlinetask/folding-directly-consecutive-tasks/1): Use `org-flag-subtree' instead of `outline-hide-subtree'. `outline-hide-subtree' leaves overlays on top of white spaces, particularly at the end of the buffer. `org-flag-subtree' does not.
This commit is contained in:
parent
cd1af27a2a
commit
12f93c112b
|
@ -8766,7 +8766,7 @@ if it was hidden in the outline."
|
||||||
(set-window-start (selected-window) (point-at-bol))
|
(set-window-start (selected-window) (point-at-bol))
|
||||||
(cond
|
(cond
|
||||||
((= more 0)
|
((= more 0)
|
||||||
(outline-hide-subtree)
|
(org-flag-subtree t)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(org-back-to-heading)
|
(org-back-to-heading)
|
||||||
(run-hook-with-args 'org-cycle-hook 'folded))
|
(run-hook-with-args 'org-cycle-hook 'folded))
|
||||||
|
|
|
@ -450,7 +450,7 @@ Archiving time is retained in the ARCHIVE_TIME node property."
|
||||||
(format-time-string
|
(format-time-string
|
||||||
(substring (cdr org-time-stamp-formats) 1 -1)))
|
(substring (cdr org-time-stamp-formats) 1 -1)))
|
||||||
(outline-up-heading 1 t)
|
(outline-up-heading 1 t)
|
||||||
(outline-hide-subtree)
|
(org-flag-subtree t)
|
||||||
(org-cycle-show-empty-lines 'folded)
|
(org-cycle-show-empty-lines 'folded)
|
||||||
(when org-provide-todo-statistics
|
(when org-provide-todo-statistics
|
||||||
;; Update TODO statistics of parent.
|
;; Update TODO statistics of parent.
|
||||||
|
|
|
@ -190,7 +190,7 @@ See `org-crypt-disable-auto-save'."
|
||||||
(error (insert contents) (error (nth 1 err)))))
|
(error (insert contents) (error (nth 1 err)))))
|
||||||
(when folded
|
(when folded
|
||||||
(goto-char start-heading)
|
(goto-char start-heading)
|
||||||
(outline-hide-subtree))
|
(org-flag-subtree t))
|
||||||
nil)))))
|
nil)))))
|
||||||
|
|
||||||
(defun org-decrypt-entry ()
|
(defun org-decrypt-entry ()
|
||||||
|
|
|
@ -412,7 +412,7 @@ it can be a list structured like an entry in `org-feed-alist'."
|
||||||
|
|
||||||
;; Normalize the visibility of the inbox tree
|
;; Normalize the visibility of the inbox tree
|
||||||
(goto-char inbox-pos)
|
(goto-char inbox-pos)
|
||||||
(outline-hide-subtree)
|
(org-flag-subtree t)
|
||||||
(org-show-children)
|
(org-show-children)
|
||||||
|
|
||||||
;; Hooks and messages
|
;; Hooks and messages
|
||||||
|
|
10
lisp/org.el
10
lisp/org.el
|
@ -6480,11 +6480,11 @@ With a numeric prefix, show all headlines up to that level."
|
||||||
(if (not (org-at-property-p)) (outline-next-heading)
|
(if (not (org-at-property-p)) (outline-next-heading)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(org-back-to-heading t)
|
(org-back-to-heading t)
|
||||||
(outline-hide-subtree)
|
(org-flag-subtree t)
|
||||||
(org-reveal)
|
(org-reveal)
|
||||||
(pcase state
|
(pcase state
|
||||||
("folded"
|
("folded"
|
||||||
(outline-hide-subtree))
|
(org-flag-subtree t))
|
||||||
("children"
|
("children"
|
||||||
(org-show-hidden-entry)
|
(org-show-hidden-entry)
|
||||||
(org-show-children))
|
(org-show-children))
|
||||||
|
@ -7490,7 +7490,7 @@ case."
|
||||||
(org-skip-whitespace)
|
(org-skip-whitespace)
|
||||||
(move-marker ins-point nil)
|
(move-marker ins-point nil)
|
||||||
(if folded
|
(if folded
|
||||||
(outline-hide-subtree)
|
(org-flag-subtree t)
|
||||||
(org-show-entry)
|
(org-show-entry)
|
||||||
(org-show-children))
|
(org-show-children))
|
||||||
(org-clean-visibility-after-subtree-move)
|
(org-clean-visibility-after-subtree-move)
|
||||||
|
@ -7656,7 +7656,7 @@ When REMOVE is non-nil, remove the subtree from the clipboard."
|
||||||
(equal org-subtree-clip (current-kill 0))
|
(equal org-subtree-clip (current-kill 0))
|
||||||
org-subtree-clip-folded)
|
org-subtree-clip-folded)
|
||||||
;; The tree was folded before it was killed/copied
|
;; The tree was folded before it was killed/copied
|
||||||
(outline-hide-subtree))
|
(org-flag-subtree t))
|
||||||
(when for-yank (goto-char newend))
|
(when for-yank (goto-char newend))
|
||||||
(when remove (pop kill-ring)))))
|
(when remove (pop kill-ring)))))
|
||||||
|
|
||||||
|
@ -20365,7 +20365,7 @@ interactive command with similar behavior."
|
||||||
(or (looking-at org-outline-regexp)
|
(or (looking-at org-outline-regexp)
|
||||||
(re-search-forward org-outline-regexp-bol end t))
|
(re-search-forward org-outline-regexp-bol end t))
|
||||||
(while (and (< (point) end) (looking-at org-outline-regexp))
|
(while (and (< (point) end) (looking-at org-outline-regexp))
|
||||||
(outline-hide-subtree)
|
(org-flag-subtree t)
|
||||||
(org-cycle-show-empty-lines 'folded)
|
(org-cycle-show-empty-lines 'folded)
|
||||||
(condition-case nil
|
(condition-case nil
|
||||||
(outline-forward-same-level 1)
|
(outline-forward-same-level 1)
|
||||||
|
|
|
@ -148,7 +148,7 @@ p4
|
||||||
*************** END
|
*************** END
|
||||||
|
|
||||||
"
|
"
|
||||||
(outline-hide-subtree)
|
(org-flag-subtree t)
|
||||||
(org-cycle)
|
(org-cycle)
|
||||||
(and
|
(and
|
||||||
(not (invisible-p (1- (search-forward "p1"))))
|
(not (invisible-p (1- (search-forward "p1"))))
|
||||||
|
|
Loading…
Reference in New Issue