emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Autoarchiving done entries
Date: Sun, 2 Sep 2007 09:30:56 +0200	[thread overview]
Message-ID: <f636c74cdbb99376cb383a7ff287f8f0@science.uva.nl> (raw)


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

             reply	other threads:[~2007-09-02  7:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-02  7:30 Carsten Dominik [this message]
2007-09-03  1:00 ` Autoarchiving done entries 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

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=f636c74cdbb99376cb383a7ff287f8f0@science.uva.nl \
    --to=dominik@science.uva.nl \
    --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).