From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [bug] org-cycle changed behavior in orgstruct-mode Date: Sun, 16 Aug 2015 11:10:15 +0200 Message-ID: <87twrzoayw.fsf@gmx.us> References: <87fv3q2lxs.fsf@gmx.us> <878u9ic8sv.fsf@nicolasgoaziou.fr> <87zj1y0zst.fsf@gmx.us> <874mk6c7sz.fsf@nicolasgoaziou.fr> <87pp2u0x60.fsf@gmx.us> <87mvxteuir.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQtxS-0003Yk-8s for emacs-orgmode@gnu.org; Sun, 16 Aug 2015 05:10:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZQtxP-0005z6-2L for emacs-orgmode@gnu.org; Sun, 16 Aug 2015 05:10:26 -0400 Received: from plane.gmane.org ([80.91.229.3]:58542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQtxO-0005yt-Sf for emacs-orgmode@gnu.org; Sun, 16 Aug 2015 05:10:23 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZQtxN-0005uR-9Q for emacs-orgmode@gnu.org; Sun, 16 Aug 2015 11:10:21 +0200 Received: from 178.162.199.92 ([178.162.199.92]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 16 Aug 2015 11:10:21 +0200 Received: from rasmus by 178.162.199.92 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 16 Aug 2015 11:10:21 +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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Nicolas Goaziou writes: > Rasmus writes: > >> Great. The bad commit seems to be: >> >> commit 898cfbcac0560d1d742d939a62c5a8253fe9b66f >> Author: Nicolas Goaziou >> Date: Mon Aug 10 13:34:07 2015 +0200 >> >> Implement faster `show-children' function >> >> * lisp/org.el (org-show-children): New function. >> (org-cycle-internal-local): >> (org-set-visibility-according-to-property): >> (org-content): >> (org-move-subtree-down): >> (orgstruct-setup): >> (org-show-set-visibility): >> * contrib/lisp/org-toc.el (org-toc-cycle-subtree): >> (org-toc-restore-config): >> * lisp/org-agenda.el (org-agenda-show-1): >> * lisp/org-feed.el (org-feed-update): Use new function. >> >> * etc/ORG-NEWS: Document new function. >> >> Suggested-by: Samuel Wales >> >> >> I guess I will have to dissect it more to figure out what broke. > > `org-cycle-internal-local' calls `org-show-children', which is the Org > specific implementation of `show-children'. OK > I don't think orgstruct details should leak into `org-show-children', so > I suggest to plug orgstruct stuff, i.e., make sure `show-children' is > called instead of `org-show-children', elsewhere. Sounds right. > One possibility is to use a hook in `org-cycle', not sure which one > though. `orgstruct-mode' could also assume its kludge status and use > something like `add-function'. This is a possibility. Isn't nadvice.el is too recent though? [Do you check NEWS files to see when something is added?]. Anyway, we can add an advice around it and redefine org-show-children or something.... Sounds ugly. Would it be enough to just change the keymap of TAB-like keys? I would love to rip orgstruct out of org.el and make it less hacky/"kludgy". The implementation remains mostly opaque to me. Rasmus -- The Kids call him Billy the Saint