Re-hide archived subtrees when showing branches

* lisp/org.el (org-kill-note-or-show-branches): Re-hide archived
  subtrees when showing branches.

Reported-by: Allen Li <vianchielfaura@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-01/msg00340.html>
This commit is contained in:
Nicolas Goaziou 2018-01-20 13:28:53 +01:00
parent 63c0266688
commit c2576f349b
1 changed files with 6 additions and 3 deletions

View File

@ -20988,9 +20988,12 @@ Use `\\[org-edit-special]' to edit table.el tables"))
"Abort storing current note, or call `outline-show-branches'." "Abort storing current note, or call `outline-show-branches'."
(interactive) (interactive)
(if (not org-finish-function) (if (not org-finish-function)
(progn (save-excursion
(outline-hide-subtree) (save-restriction
(call-interactively 'outline-show-branches)) (org-narrow-to-subtree)
(org-flag-subtree t)
(call-interactively 'outline-show-branches)
(org-hide-archived-subtrees (point-min) (point-max))))
(let ((org-note-abort t)) (let ((org-note-abort t))
(funcall org-finish-function)))) (funcall org-finish-function))))