summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2019-05-11 09:48:53 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2019-05-11 09:48:53 +0200
commit12f93c112b0e99a609c1df09b9a20c82c6293b42 (patch)
treed7125253cf047123ee856d9cae82f9612616809c
parentcd1af27a2a7dbecca3d309e96f6ac51c841c2586 (diff)
downloadorg-mode-12f93c112b0e99a609c1df09b9a20c82c6293b42.tar.gz
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.
-rw-r--r--lisp/org-agenda.el2
-rw-r--r--lisp/org-archive.el2
-rw-r--r--lisp/org-crypt.el2
-rw-r--r--lisp/org-feed.el2
-rw-r--r--lisp/org.el10
-rw-r--r--testing/lisp/test-org-inlinetask.el2
6 files changed, 10 insertions, 10 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 95bdb07..fbf520c 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -8766,7 +8766,7 @@ if it was hidden in the outline."
(set-window-start (selected-window) (point-at-bol))
(cond
((= more 0)
- (outline-hide-subtree)
+ (org-flag-subtree t)
(save-excursion
(org-back-to-heading)
(run-hook-with-args 'org-cycle-hook 'folded))
diff --git a/lisp/org-archive.el b/lisp/org-archive.el
index 55c5681..4721ef7 100644
--- a/lisp/org-archive.el
+++ b/lisp/org-archive.el
@@ -450,7 +450,7 @@ Archiving time is retained in the ARCHIVE_TIME node property."
(format-time-string
(substring (cdr org-time-stamp-formats) 1 -1)))
(outline-up-heading 1 t)
- (outline-hide-subtree)
+ (org-flag-subtree t)
(org-cycle-show-empty-lines 'folded)
(when org-provide-todo-statistics
;; Update TODO statistics of parent.
diff --git a/lisp/org-crypt.el b/lisp/org-crypt.el
index 9cd76c9..1bdf623 100644
--- a/lisp/org-crypt.el
+++ b/lisp/org-crypt.el
@@ -190,7 +190,7 @@ See `org-crypt-disable-auto-save'."
(error (insert contents) (error (nth 1 err)))))
(when folded
(goto-char start-heading)
- (outline-hide-subtree))
+ (org-flag-subtree t))
nil)))))
(defun org-decrypt-entry ()
diff --git a/lisp/org-feed.el b/lisp/org-feed.el
index 0f18673..826e761 100644
--- a/lisp/org-feed.el
+++ b/lisp/org-feed.el
@@ -412,7 +412,7 @@ it can be a list structured like an entry in `org-feed-alist'."
;; Normalize the visibility of the inbox tree
(goto-char inbox-pos)
- (outline-hide-subtree)
+ (org-flag-subtree t)
(org-show-children)
;; Hooks and messages
diff --git a/lisp/org.el b/lisp/org.el
index d814e44..f0e7c3a 100644
--- a/lisp/org.el
+++ b/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)
(save-excursion
(org-back-to-heading t)
- (outline-hide-subtree)
+ (org-flag-subtree t)
(org-reveal)
(pcase state
("folded"
- (outline-hide-subtree))
+ (org-flag-subtree t))
("children"
(org-show-hidden-entry)
(org-show-children))
@@ -7490,7 +7490,7 @@ case."
(org-skip-whitespace)
(move-marker ins-point nil)
(if folded
- (outline-hide-subtree)
+ (org-flag-subtree t)
(org-show-entry)
(org-show-children))
(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))
org-subtree-clip-folded)
;; The tree was folded before it was killed/copied
- (outline-hide-subtree))
+ (org-flag-subtree t))
(when for-yank (goto-char newend))
(when remove (pop kill-ring)))))
@@ -20365,7 +20365,7 @@ interactive command with similar behavior."
(or (looking-at org-outline-regexp)
(re-search-forward org-outline-regexp-bol end t))
(while (and (< (point) end) (looking-at org-outline-regexp))
- (outline-hide-subtree)
+ (org-flag-subtree t)
(org-cycle-show-empty-lines 'folded)
(condition-case nil
(outline-forward-same-level 1)
diff --git a/testing/lisp/test-org-inlinetask.el b/testing/lisp/test-org-inlinetask.el
index 1e8c9ff..7e9f7e3 100644
--- a/testing/lisp/test-org-inlinetask.el
+++ b/testing/lisp/test-org-inlinetask.el
@@ -148,7 +148,7 @@ p4
*************** END
"
- (outline-hide-subtree)
+ (org-flag-subtree t)
(org-cycle)
(and
(not (invisible-p (1- (search-forward "p1"))))