From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Sorting nodes by clocked time Date: Thu, 17 Apr 2014 13:55:21 +0200 Message-ID: <87mwfkb26u.fsf@bzg.ath.cx> References: <87zjjk5p9q.fsf@bzg.ath.cx> <87ioq82pk9.fsf@bzg.ath.cx> <87a9bk2pbc.fsf@bzg.ath.cx> <87lhv442xy.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wakuh-0003A7-MS for emacs-orgmode@gnu.org; Thu, 17 Apr 2014 07:55:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wakuc-0006Vk-0A for emacs-orgmode@gnu.org; Thu, 17 Apr 2014 07:55:31 -0400 Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:47835) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wakub-0006Ve-Pm for emacs-orgmode@gnu.org; Thu, 17 Apr 2014 07:55:25 -0400 Received: by mail-wi0-f177.google.com with SMTP id cc10so691922wib.10 for ; Thu, 17 Apr 2014 04:55:24 -0700 (PDT) In-Reply-To: (Noah Slater's message of "Thu, 17 Apr 2014 13:33:45 +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: Noah Slater Cc: emacs-orgmode@gnu.org Noah Slater writes: > Okay, that seem to work. > > But I'm not able to get this work: > > (add-hook 'org-after-sorting-entries-or-items-hook > (lambda() (org-cycle-hide-drawers 'children))) > > After running the sort, all the LOGBOOK draws are still open. Try this: (defun my-hide-all-drawers-in-current-subtree () "Hide all drawers in the current subtree." (save-restriction (org-narrow-to-subtree) (org-cycle-hide-drawers 'all) (org-cycle-internal-local))) (add-hook 'org-after-sorting-entries-or-items-hook 'my-hide-all-drawers-in-current-subtree) > I'm also thinking: even if this closes the logbook draws, all the > nodes will be unfolded. But my node tree is quite large. Is it be > possible to refold all the nodes after n-levels? > > So let's say I have: > > * Level 1 > ** Level 2 > *** Level 3 > > If I move the point to Level 1 and sort, I'd like it fold all Level 2 > items, but leave Level 1 unfolded. You can fix the cycling through the hook above. HTH, -- Bastien