emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Autoarchiving done entries
@ 2007-09-02  7:30 Carsten Dominik
  2007-09-03  1:00 ` Xavier Maillard
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Carsten Dominik @ 2007-09-02  7:30 UTC (permalink / raw)
  To: org-mode mailing list


I got his message from John a few days ago - might be useful for
some.  And since I have not yet decided if and how I am going to
include it, help yourself, for now.

(message has been slightly edited by CD)

Begin forwarded message:

> From: John Wiegley <johnw@newartisans.com>
> Date: August 31, 2007 5:04:49 CEST


> I use something that I thought your users might find handy.  It causes 
> all
> completed todo items to be automatically flushed to the archive 
> whenever I
> save my todo file.
>
> It consists of these settings:
>
>   (setq safe-local-variable-values (quote ((after-save-hook 
> archive-done-tasks))))
>
>   (defun org-my-archive-done-tasks ()
>     (interactive)
>     (save-excursion
>       (goto-char (point-min))
>       (while (re-search-forward
>      	        (concat "\\* " (regexp-opt org-done-keywords) " ") nil t)
>         (goto-char (line-beginning-position))
>         (org-archive-subtree))))
>
>   (defalias 'archive-done-tasks 'org-my-archive-done-tasks)
>
> After setting these, I add the following to the top of my todo file:
>
>   MY TASKS  -*- mode: org; fill-column: 78; after-save-hook: 
> (archive-done-tasks) -*-
>
> John
>
>

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

end of thread, other threads:[~2007-09-05  3:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-02  7:30 Autoarchiving done entries Carsten Dominik
2007-09-03  1:00 ` Xavier Maillard
2007-09-03  2:27 ` David Emery
2007-09-04  1:00   ` Xavier Maillard
2007-09-04  2:17     ` John Wiegley
2007-09-04  7:02       ` Xavier Maillard
2007-09-05  3:42         ` Carsten Dominik
2007-09-03  3:12 ` John Wiegley

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