From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: sorting a single todo kw by inactive timestamp Date: Wed, 15 Jul 2009 15:31:49 -0700 Message-ID: <20524da70907151531k45ba2cc0ud08f5a89cafb3ee5@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MRD1O-0006m2-Ut for emacs-orgmode@gnu.org; Wed, 15 Jul 2009 18:32:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MRD1J-0006lq-E1 for emacs-orgmode@gnu.org; Wed, 15 Jul 2009 18:32:17 -0400 Received: from [199.232.76.173] (port=43400 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MRD1J-0006ln-81 for emacs-orgmode@gnu.org; Wed, 15 Jul 2009 18:32:13 -0400 Received: from mail-px0-f193.google.com ([209.85.216.193]:34603) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MRD1I-00066K-QS for emacs-orgmode@gnu.org; Wed, 15 Jul 2009 18:32:13 -0400 Received: by pxi31 with SMTP id 31so3030731pxi.14 for ; Wed, 15 Jul 2009 15:32:11 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org I have siblings with various todo kw. I would like to sort just the ones with a certain todo kw (which, if it makes it easier, can be considered to be contiguous) by the first inactive timestamp. I want all the other nodes to not be changed in any way. Does anybody have safe code for doing this type of thing? Perhaps the way it is done is to select a region of a bunch of contiguous nodes that have a given todo kw, but I don't want to reinvent regexps or figure out all the ways that such code could be brittle. This is to be called automatically. Thanks.