From mboxrd@z Thu Jan 1 00:00:00 1970 From: Meir Goldenberg Subject: Automatically tagging DONE items as archived Date: Sun, 23 Aug 2015 10:38:36 +0300 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1134a266bdcf04051df59680 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTPrS-0005Ua-RY for emacs-orgmode@gnu.org; Sun, 23 Aug 2015 03:38:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZTPrS-0001ox-0E for emacs-orgmode@gnu.org; Sun, 23 Aug 2015 03:38:38 -0400 Received: from mail-ob0-x22b.google.com ([2607:f8b0:4003:c01::22b]:36383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTPrR-0001or-Rb for emacs-orgmode@gnu.org; Sun, 23 Aug 2015 03:38:37 -0400 Received: by obkg7 with SMTP id g7so89604173obk.3 for ; Sun, 23 Aug 2015 00:38:36 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --001a1134a266bdcf04051df59680 Content-Type: text/plain; charset=UTF-8 I would like to achieve two things: 1. Tag all tasks that are already marked DONE as ARCHIVE. I tried the following, but it messes up the file, creating multiple levels of archived items: (defun my-org-archive-done-tasks () (interactive) (org-map-entries 'org-archive-to-archive-sibling "/DONE")) (global-set-key (kbd "C-c z") 'my-org-archive-done-tasks) 2. Have org-archive-to-archive-sibling be applied automatically when I mark a task DONE. I searched for a while, but was not able to find a solution. Can these be done? Thanks! --001a1134a266bdcf04051df59680 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I would like to achieve two things:

1. = Tag all tasks that are already marked DONE as ARCHIVE. I tried the followin= g, but it messes up the file, creating multiple levels of archived items:

(defun my-org-archive-done-tasks ()
= =C2=A0 (interactive)
=C2=A0 (org-map-entries 'org-archive-to-= archive-sibling "/DONE"))
(global-set-key (kbd "C-= c z") 'my-org-archive-done-tasks)

2= . Have=C2=A0org-archive-to-archive-sibling be applied automatically when I = mark a task DONE.=C2=A0

I searched for a while, bu= t was not able to find a solution. Can these be done? Thanks! =C2=A0
<= /div> --001a1134a266bdcf04051df59680--