[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Make org-cycle outline-mode compatible again
From: |
Jonas Bernoulli |
Subject: |
[O] Make org-cycle outline-mode compatible again |
Date: |
Tue, 25 Jul 2017 17:51:09 +0200 |
User-agent: |
mu4e 0.9.19; emacs 25.2.1 |
Hello
While I realize I probably should not be using `org-cycle' in buffers in
which `outline-minor-mode' is enabled, I have been doing it for a long
time, and while that command certainly is overkill in such buffers, the
only problem I have run into is that I usually have to apply a tiny
patch to make it work.
That's what is currently necessary:
diff --git a/lisp/org.el b/lisp/org.el
index f1a573d35..7716c0961 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6948,7 +6948,10 @@ (defun org-cycle-internal-local ()
(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
+ (if (derived-mode-p 'org-mode)
+ (org-show-children)
+ (outline-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)
I am considering reviving `outline-cycle' from `outline-magic'
eventually, or writing something from scratch. I don't remember the
details, but last time I tried using `outline-cycle' it gave me more
grieve than just patching `org-cycle-internal-local' as above.
I am hoping you will apply this patch or something similar.
Thanks,
Jonas
- [O] Make org-cycle outline-mode compatible again,
Jonas Bernoulli <=