From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wanrong Lin Subject: New variable request: org-archive-todo-only Date: Mon, 10 Dec 2007 14:24:03 -0500 Message-ID: <475D9253.6040707@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J1oEk-0005xB-DT for emacs-orgmode@gnu.org; Mon, 10 Dec 2007 14:24:18 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J1oEi-0005vx-KG for emacs-orgmode@gnu.org; Mon, 10 Dec 2007 14:24:17 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1oEi-0005vm-Ce for emacs-orgmode@gnu.org; Mon, 10 Dec 2007 14:24:16 -0500 Received: from an-out-0708.google.com ([209.85.132.247]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J1oEi-0001I3-KX for emacs-orgmode@gnu.org; Mon, 10 Dec 2007 14:24:16 -0500 Received: by an-out-0708.google.com with SMTP id c25so316082ana for ; Mon, 10 Dec 2007 11:24:15 -0800 (PST) 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: emacs-orgmode@gnu.org Hi, In my org file I have a mix of "actionable" items (TODO items) and informative items (notes, references and etc). Normally I only archive TODO items when they are done, and don't archive informative items (since most of them have some long-term value). So, can we add a new variable to "org-archive-todo-only" to control the behavior of following functions: 1. org-archive-subtree 1) when org-archive-todo-only is nil, behave as it does now, with a little bit modification: - if the current heading is a TODO item and org-archive-mark-done is nil, check whether it is in a "DONE" state. If not, prompt for user confirmation. 2) when org-archive-todo-only is t, if the current heading is a TODO item, behaves the same as 1). if the current heading is NOT a TODO item, prompt for user confirmation. 2. org-archive-all-done 1) when org-archive-todo-only is nil, behaves as it does now 2) when org-archive-todo-only is t, only checks the headings that are a TODO item. Without the change to those functions, I have to be very careful not archiving something I don't want to. I put in an advice by myself to change the org-archive-subtree behavior as above, but I can not do it with function org-archive-all-done. And I also think this may be an improvement that makes sense for many people, hence the proposal/request. Thanks a lot for comments and consideration of the above. Wanrong