From 1dcad907938450d0c718aa6f79a1a363ed6d72cd Mon Sep 17 00:00:00 2001 From: Rasmus Date: Sun, 30 Aug 2015 20:16:28 +0200 Subject: [PATCH] org.el: Only call org-show-children from org-mode * org.el (org-cycle-internal-local): Only call org-show-children in org-mode. orgstruct-mode does not behave nicely when using org-show-children as opposed to show-children. --- lisp/org.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 82c42c2..49e4e53 100755 --- a/lisp/org.el +++ b/lisp/org.el @@ -6902,7 +6902,11 @@ in special contexts. (if (org-at-item-p) (org-list-set-item-visibility (point-at-bol) struct 'children) (org-show-entry) - (org-with-limited-levels (org-show-children)) + (org-with-limited-levels + ;; `orgstruct-mode' does not work well with + ;; `org-show-children'. Thus, use `show-children' unless in + ;; org-mode. + (if (derived-mode-p 'org-mode) (org-show-children) (show-children))) ;; FIXME: This slows down the func way too much. ;; How keep drawers hidden in subtree anyway? ;; (when (memq 'org-cycle-hide-drawers org-cycle-hook) -- 2.5.1