* How to collapse all LOGBOOKS at once?
@ 2020-02-27 3:10 William Denton
2020-02-27 3:31 ` Kyle Meyer
0 siblings, 1 reply; 3+ messages in thread
From: William Denton @ 2020-02-27 3:10 UTC (permalink / raw)
To: emacs-orgmode
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to collapse all LOGBOOKS at once?
2020-02-27 3:10 How to collapse all LOGBOOKS at once? William Denton
@ 2020-02-27 3:31 ` Kyle Meyer
2020-02-27 4:04 ` William Denton
0 siblings, 1 reply; 3+ messages in thread
From: Kyle Meyer @ 2020-02-27 3:31 UTC (permalink / raw)
To: William Denton, emacs-orgmode
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)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to collapse all LOGBOOKS at once?
2020-02-27 3:31 ` Kyle Meyer
@ 2020-02-27 4:04 ` William Denton
0 siblings, 0 replies; 3+ messages in thread
From: William Denton @ 2020-02-27 4:04 UTC (permalink / raw)
To: Kyle Meyer; +Cc: emacs-orgmode
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-27 4:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-27 3:10 How to collapse all LOGBOOKS at once? William Denton
2020-02-27 3:31 ` Kyle Meyer
2020-02-27 4:04 ` William Denton
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).