From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Automatic move DONE items to the tail of the list Date: Wed, 16 Jun 2010 22:15:25 +0200 Message-ID: <87r5k6buoy.fsf@bzg.ath.cx> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=47646 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOz1I-00019r-RY for emacs-orgmode@gnu.org; Wed, 16 Jun 2010 16:15:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOz1G-0006yx-NS for emacs-orgmode@gnu.org; Wed, 16 Jun 2010 16:15:31 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:63998) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOz1G-0006yo-IA for emacs-orgmode@gnu.org; Wed, 16 Jun 2010 16:15:30 -0400 Received: by wyf28 with SMTP id 28so6608173wyf.0 for ; Wed, 16 Jun 2010 13:15:29 -0700 (PDT) In-Reply-To: (Marcelo de Moraes Serpa's message of "Wed, 16 Jun 2010 14:26:04 -0500") 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: Marcelo de Moraes Serpa Cc: Org Mode Marcelo de Moraes Serpa writes: > Is there any way I could setup org to, at each save, re-order DONE items to the > end of their respective lists? You might try this: ,---- | (add-hook 'org-mode-hook | (lambda() | (add-hook 'before-save-hook | (lambda() | (save-excursion | (goto-char (point-min)) | (org-sort-entries-or-items nil ?o)))))) `---- It should sort top level entries by TODO order (untested). -- Bastien