TAB should respect org-cycle-open-archived-trees

And shouldn't cycle visibility of archived trees by default.
This commit is contained in:
Henrik Lissner 2018-07-12 20:38:17 +02:00
parent 54c7936a77
commit e7b252f442
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -395,13 +395,15 @@ with `org-cycle')."
(unless (eq this-command 'org-shifttab) (unless (eq this-command 'org-shifttab)
(save-excursion (save-excursion
(org-beginning-of-line) (org-beginning-of-line)
(when (org-at-heading-p) (when (and (org-at-heading-p)
(when (or (not arg) (or org-cycle-open-archived-trees
(outline-invisible-p (line-end-position))) (not (member org-archive-tag (org-get-tags))))
(outline-toggle-children) (or (not arg)
(unless (outline-invisible-p (line-end-position)) (outline-invisible-p (line-end-position))))
(org-cycle-hide-drawers 'subtree)) (outline-toggle-children)
t))))) (unless (outline-invisible-p (line-end-position))
(org-cycle-hide-drawers 'subtree))
t))))
;;;###autoload ;;;###autoload
(defun +org|remove-occur-highlights () (defun +org|remove-occur-highlights ()