emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Automatic move DONE items to the tail of the list
@ 2010-06-16 19:26 Marcelo de Moraes Serpa
  2010-06-16 20:15 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Marcelo de Moraes Serpa @ 2010-06-16 19:26 UTC (permalink / raw)
  To: Org Mode


[-- Attachment #1.1: Type: text/plain, Size: 146 bytes --]

Hi,

Is there any way I could setup org to, at each save, re-order DONE items to
the end of their respective lists?

Thanks in advance,

Marcelo.

[-- Attachment #1.2: Type: text/html, Size: 168 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Automatic move DONE items to the tail of the list
  2010-06-16 19:26 Automatic move DONE items to the tail of the list Marcelo de Moraes Serpa
@ 2010-06-16 20:15 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2010-06-16 20:15 UTC (permalink / raw)
  To: Marcelo de Moraes Serpa; +Cc: Org Mode

Marcelo de Moraes Serpa <celoserpa@gmail.com> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-16 20:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-16 19:26 Automatic move DONE items to the tail of the list Marcelo de Moraes Serpa
2010-06-16 20:15 ` Bastien

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).