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? When I'm fixing up the amounts of time I've been working on this, or when I sync a file across two machines, I often end up with a lot of LOGBOOK drawers open but they're just taking up screen space. Using TAB to close them one by one is good for a bit of tidying, but I'd like to do them all at once. Thanks, 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/
William Denton <wtd@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)
On 27 February 2020, Kyle Meyer wrote: > William Denton <wtd@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/