On 27 February 2020, Kyle Meyer wrote:
William Denton <w...@pobox.com> 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/