From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonas Bernoulli Subject: Make org-cycle outline-mode compatible again Date: Tue, 25 Jul 2017 17:51:09 +0200 Message-ID: <87shhk5xci.fsf@bernoul.li> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1da27U-0004xt-5Z for emacs-orgmode@gnu.org; Tue, 25 Jul 2017 11:51:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1da27Q-0000DH-7D for emacs-orgmode@gnu.org; Tue, 25 Jul 2017 11:51:36 -0400 Received: from mail.hostpark.net ([212.243.197.30]:52192) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1da27Q-00009s-0l for emacs-orgmode@gnu.org; Tue, 25 Jul 2017 11:51:32 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 3AC0716745 for ; Tue, 25 Jul 2017 17:51:24 +0200 (CEST) Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10124) with ESMTP id FFtLhgOTvbx3 for ; Tue, 25 Jul 2017 17:51:23 +0200 (CEST) Received: from desktop (77-58-214-193.dclient.hispeed.ch [77.58.214.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id 8CE0716AAA for ; Tue, 25 Jul 2017 17:51:09 +0200 (CEST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org 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