From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Make org-cycle outline-mode compatible again Date: Tue, 25 Jul 2017 20:47:22 +0200 Message-ID: <87pocomk05.fsf@nicolasgoaziou.fr> References: <87shhk5xci.fsf@bernoul.li> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1da4ri-0005Eg-2M for emacs-orgmode@gnu.org; Tue, 25 Jul 2017 14:47:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1da4re-0000jT-VF for emacs-orgmode@gnu.org; Tue, 25 Jul 2017 14:47:30 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:34941) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1da4re-0000iW-Nh for emacs-orgmode@gnu.org; Tue, 25 Jul 2017 14:47:26 -0400 In-Reply-To: <87shhk5xci.fsf@bernoul.li> (Jonas Bernoulli's message of "Tue, 25 Jul 2017 17:51:09 +0200") 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: Jonas Bernoulli Cc: emacs-orgmode@gnu.org Hello, Jonas Bernoulli writes: > 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))) I suggest to use a hook instead (maybe `org-tab-first-hook' or some such). Regards, -- Nicolas Goaziou