From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: Behavior of `org-show-entry' Date: Sun, 05 Feb 2017 15:16:21 -0800 Message-ID: <877f548bzu.fsf@ericabrahamsen.net> References: <87lgtk8kja.fsf@ericabrahamsen.net> <87d1ew5m8w.fsf@kyleam.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1caW2t-0000K3-TA for emacs-orgmode@gnu.org; Sun, 05 Feb 2017 18:16:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1caW2p-0001tu-Hc for emacs-orgmode@gnu.org; Sun, 05 Feb 2017 18:16:35 -0500 Received: from [195.159.176.226] (port=60848 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1caW2p-0001tB-BC for emacs-orgmode@gnu.org; Sun, 05 Feb 2017 18:16:31 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1caW2h-0005MG-RI for emacs-orgmode@gnu.org; Mon, 06 Feb 2017 00:16:23 +0100 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 Kyle Meyer writes: > Eric Abrahamsen writes: > >> I do a lot of my Org navigation with `helm-org-in-buffer-headings' and >> `helm-org-agenda-files-headings', which prompt you for an org heading, >> then take you there. >> >> I'm always annoyed that, once you're at the heading, it leaves it in >> a half-open state where you can see the immediate text of the target >> entry, but all of its child entries are replaced by an ellipses. >> >> * Target Heading >> Drawers and text >> ... # ellipses instead of child headings >> * Next Heading >> >> You then have to hit twice to see the children. >> >> The helm commands end by calling `org-show-entry', which first does >> this: >> >> (outline-flag-region >> (max (point-min) (1- (point))) >> (save-excursion >> (if (re-search-forward >> (concat "[\r\n]\\(" org-outline-regexp "\\)") nil t) >> (match-beginning 1) >> (point-max))) >> nil) >> >> Which leaves the heading in the state described above, and then does >> this: >> >> (org-cycle-hide-drawers 'children) >> >> Which has no effect. >> >> I'm not really sure what the purpose of `outline-flag-region' is, but >> I'm pretty sure this isn't the desired effect. > > Based on how org-show-entry calls it, outline-flag-region shows the text > from the current heading to the next. So it seems to behave as > documented: "[s]how the body directly following this heading". Okay, but I still don't see how this would ever be the desired result. You can't get to *any* next visibility state without first wasting a . >> The call to `org-cycle-hide-drawers' should reveal children, isn't >> that right? > > The purpose isn't to reveal the child headings (I don't understand why > the argument is called "children"), but to hide the drawers. Weird! But thank you for doing the thinking I was apparently too lazy to do :) [...] >> Which part of this should be tweaked to achieve the desired effect? > > Perhaps helm could call org-show-children after it calls org-show-entry. Okay, cool. I guess my main question was: should this be fixed in helm, or in org? I'll try clobbering the helm functions for a while and see how that goes, then raise this on the helm list. Thanks for your help, Eric