From mboxrd@z Thu Jan 1 00:00:00 1970 From: Markus Heller Subject: Re: Org-expiry: How to define keyword for org-expiry-add-keyword Date: Thu, 07 Jan 2010 09:57:33 -0800 Message-ID: References: <87r5q4ebwu.wl%maus.david@gmail.com> <873a2halyg.wl%maus.david@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 1NSwcb-0003dP-E0 for emacs-orgmode@gnu.org; Thu, 07 Jan 2010 12:58:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSwcW-0003SB-IJ for emacs-orgmode@gnu.org; Thu, 07 Jan 2010 12:58:08 -0500 Received: from [199.232.76.173] (port=50393 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSwcW-0003Ru-6m for emacs-orgmode@gnu.org; Thu, 07 Jan 2010 12:58:04 -0500 Received: from lo.gmane.org ([80.91.229.12]:42393) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NSwcT-0006Wy-OQ for emacs-orgmode@gnu.org; Thu, 07 Jan 2010 12:58:02 -0500 Received: from list by lo.gmane.org with local (Exim 4.50) id 1NSwcP-0002OS-Jm for emacs-orgmode@gnu.org; Thu, 07 Jan 2010 18:57:57 +0100 Received: from mail.cdrd.ca ([142.103.191.98]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 07 Jan 2010 18:57:57 +0100 Received: from hellerm2 by mail.cdrd.ca with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 07 Jan 2010 18:57:57 +0100 In-Reply-To: <873a2halyg.wl%maus.david@gmail.com> 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 On 1/7/2010 9:01 AM, David Maus wrote: > At Tue, 05 Jan 2010 15:26:06 -0800, > Markus Heller wrote: >> >> On 1/5/2010 8:47 AM, David Maus wrote: >>> Hi Markus, >>> >>> At Mon, 04 Jan 2010 11:37:45 -0800, >>> Markus Heller wrote: >>>> >>>> If I type M-x org-expiry-process-entries in expiry.org, I get the >>>> following error: >>>> >>>> Symbol's function definition is void: org-expiry-handler function >>> >>> This actually is a bug in org-expiry.el that is fixed with the >>> attached patch. >> >> Thanks for the patch. >> >> But when I run M-x org-expiry-process-entries in the agenda or in my >> example file (see below), I get the following message in the minibuffer: >> >> "The mark is not set now, so there is no region" >> >> When I run M-x org-expiry-process-entry in my example file (see below), >> it works! This command doesn't work in the agenda, but this is by >> design, right? >> >> Am I correct in assuming that I should be able to use M-x >> org-expiry-process-entries in the agenda? > > No. Up to now org-expiry is constructed to work on a per file basis > and `org-expiry-process-entries' even expects the headlines to process > in a region. That is what the first message "The mark is not set now, > so there is no region" complains about. > > It seems reasonable to me that org-expiry should provide a function > that processes all headlines in a buffer and processing all headlines > in an agenda view. > > Could I ask you to elaborate on the intended use of org-expiry? I'm > not quite sure about how expiry fits in the overall concept of > orgmode. > Hi David, in the thread "Contracts in org-mode" (Message-ID: ), org-expiry was brought to my attention. Here's a description of what I try to achieve: I have several Workorders (WO) with different clients. I only can do work for them if a WO has been signed and is active. In my org files, such a WO gets the keyword "ACTIVE". When a WO expires, it gets a keyword "EXPIRED". I have agenda views for "ACTIVE" and "EXPIRED" so that I can see at one glance what is active and what needs to be renewed. Right now, I manually change the keyword from ACTIVE to EXPIRED (see my example file at the end), but it would be awesome, i.e. really helpful if I could use the agenda view with all ACTIVE WOs and do M-x org-expiry-process-entries. Does this elaboration make sense to you? I'm open for any kinds of suggestions here ... Thanks Markus Example file (needs org-depend): * Workorder WOyyyy ** TODO Create WO :PROPERTIES: :ID: WOyyyy-Create :TRIGGER: WOyyyy-Sign(TODO) :END: ** PI Signature :PROPERTIES: :ID: WOyyyy-Sign :BLOCKER: WOyyyy-Create :TRIGGER: WOyyyy-Service(ACTIVE) WOyyyy-Analysis(ACTIVE) WOyyyy-Renew(TODO) WOyyyy-Expire(TODO) :END: ** Renew WO DEADLINE: <2010-03-31 Wed> :PROPERTIES: :ID: WOyyyy-Renew :BLOCKER: WOyyyy-Sign :END: ** Expire WO DEADLINE: <2010-03-31 Wed> :PROPERTIES: :ID: WOyyyy-Expire :BLOCKER: WOyyyy-Sign :TRIGGER: WOyyyy-Service(EXPIRED) WOyyyy-Analysis(EXPIRED) :END: ** Service NMR :PROPERTIES: :ID: WOyyyy-Service :BLOCKER: WOyyyy-Sign :END: ** Data Analysis :PROPERTIES: :ID: WOyyyy-Analysis :BLOCKER: WOyyyy-Sign :END: