emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: William Denton <wtd@pobox.com>
To: Kyle Meyer <kyle@kyleam.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: How to collapse all LOGBOOKS at once?
Date: Wed, 26 Feb 2020 23:04:17 -0500 (EST)	[thread overview]
Message-ID: <alpine.DEB.2.02.2002262303070.20231@shell.miskatonic.org> (raw)
In-Reply-To: <8736awemes.fsf@kyleam.com>

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/

      reply	other threads:[~2020-02-27  4:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.02.2002262303070.20231@shell.miskatonic.org \
    --to=wtd@pobox.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=kyle@kyleam.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).