From mboxrd@z Thu Jan 1 00:00:00 1970 From: William Denton Subject: Re: How to collapse all LOGBOOKS at once? Date: Wed, 26 Feb 2020 23:04:17 -0500 (EST) Message-ID: References: <8736awemes.fsf@kyleam.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:49763) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7APM-0001T6-Vi for emacs-orgmode@gnu.org; Wed, 26 Feb 2020 23:04:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7APL-0000wB-H1 for emacs-orgmode@gnu.org; Wed, 26 Feb 2020 23:04:20 -0500 Received: from shell.miskatonic.org ([54.39.142.95]:51188) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j7APL-0000q3-Dc for emacs-orgmode@gnu.org; Wed, 26 Feb 2020 23:04:19 -0500 In-Reply-To: <8736awemes.fsf@kyleam.com> 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-mx.org@gnu.org Sender: "Emacs-orgmode" To: Kyle Meyer Cc: emacs-orgmode@gnu.org On 27 February 2020, Kyle Meyer wrote: > William Denton writes: > >> The only thing I really use drawers for is with clock tracking, so for me this >> is just about :LOGBOOK: but it could be about other types of drawers, or all >> drawers: is there a way to collapse them all at once? > > I'm not aware of a dedicated command that does that, but I think you can > get the behavior you're after by defining a command that calls > > (org-cycle-hide-drawers 'all) Aha, thanks! There are probably many betters way to do it, but this works: ;; Use C-c d to close all the open drawers in a file (defun add-org-close-all-drawers-key () (local-set-key (kbd "C-c d") (lambda () (interactive) (org-cycle-hide-drawers 'all)))) (add-hook 'org-mode-hook 'add-org-close-all-drawers-key) Bill -- William Denton :: Toronto, Canada --- Listening to Art: https://listeningtoart.org/ https://www.miskatonic.org/ --- GHG.EARTH: https://ghg.earth/ Caveat lector. --- STAPLR: https://staplr.org/