emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@altern.org>
To: Bernt Hansen <bernt@norang.ca>
Cc: Org Mode <emacs-orgmode@gnu.org>,
	Marcelo de Moraes Serpa <celoserpa@gmail.com>
Subject: Re: "DONE" all subtasks recursively
Date: Fri, 22 Jul 2011 15:52:10 +0200	[thread overview]
Message-ID: <8762mu1kz9.fsf@gnu.org> (raw)
In-Reply-To: <87aac7dnr6.fsf@norang.ca> (Bernt Hansen's message of "Thu, 21 Jul 2011 22:59:09 -0400")

Hi Bernt,

Bernt Hansen <bernt@norang.ca> writes:

> (defun bh/mark-subtree-done ()
>   (interactive)
>   (org-mark-subtree)
>   (let ((limit (point)))
>     (save-excursion
>       (exchange-point-and-mark)
>       (while (> (point) limit)
> 	(org-todo "DONE")
> 	(outline-previous-visible-heading 1))
>       (org-todo "DONE"))))
>
> Then M-x bh/mark-subtree-done.

Thanks for this -- I added an entry in Worg/org-hacks.html

Best,

-- 
 Bastien

      reply	other threads:[~2011-07-22 13:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-18 18:30 "DONE" all subtasks recursively Marcelo de Moraes Serpa
2011-07-20 15:41 ` Marcelo de Moraes Serpa
2011-07-21  8:49   ` Aankhen
2011-07-22  2:59   ` Bernt Hansen
2011-07-22 13:52     ` Bastien [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=8762mu1kz9.fsf@gnu.org \
    --to=bzg@altern.org \
    --cc=bernt@norang.ca \
    --cc=celoserpa@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).