From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc-Oliver Ihm Subject: Re: Still Wishing for Snooze Date: Thu, 24 Jan 2013 21:09:25 +0100 Message-ID: <510194F5.50205@ihm.name> References: <50FD86D4.8080105@up.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TyT7K-0006ou-L1 for emacs-orgmode@gnu.org; Thu, 24 Jan 2013 15:09:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TyT7C-0007tu-Re for emacs-orgmode@gnu.org; Thu, 24 Jan 2013 15:09:46 -0500 Received: from smtp01.udag.de ([89.31.137.46]:35371) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TyT7C-0007tL-KW for emacs-orgmode@gnu.org; Thu, 24 Jan 2013 15:09:38 -0500 In-Reply-To: <50FD86D4.8080105@up.edu> 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: "Andrew M. Nuxoll" , emacs-orgmode@gnu.org Hi Andrew, some time ago I did somethin similar (see below), it works with properties and might come close, to what you want ... best regards, Marc (defun org-date-state (arg) "Save away state for current node; with prefix restore for all nodes if time has passed." (interactive "P") (if arg (progn (let ((today (format-time-string (substring (car org-time-stamp-formats) 1 -1))) (nvisited 0) (nchanged 0)) (message "Scanning...") (org-map-entries (lambda () (let ((date_state (org-entry-get nil "DATE_STATE")) date state) (incf nvisited) (when date_state (unless (string-match (concat "\\[" org-ts-regexp1 "\\] \\(" (regexp-opt org-todo-keywords-1) "\\)") date_state) (error "Property DATE_STATE ('%s') does not consist of date and todo keyword !" date_state)) (setq date (match-string 1 date_state)) (setq state (match-string 9 date_state)) (unless (string< today date) (org-todo state) (org-delete-property "DATE_STATE") (search-forward-regexp org-property-start-re) (org-remove-empty-drawer-at "PROPERTIES" (point)) (incf nchanged))))) nil 'agenda) (message "Visited %d entries and changed %d of them" nvisited nchanged))) (org-entry-put nil "DATE_STATE" (concat (format-time-string (org-time-stamp-format nil t) (org-read-date nil t)) " " (org-get-todo-state))) (org-todo org-date-state-wait-state))) Am 21.01.2013 19:20, schrieb Andrew M. Nuxoll: > A while ago I posted for help in adding an ability to "snooze" a to-do item: > > http://www.mail-archive.com/emacs-orgmode@gnu.org/msg20114.html > > At the time, the only solution available was to create a manual copy of the item. This approach creates as many problems as it solves for me. I've gotten so frustrated with this that I'm really to knuckle under and fix it myself. > > I'd like to modify the org-mode code to support the following: > > 1. Add a date tag to an entry that indicates that it is "inactive" until a certain date. I'm picturing something like this: > > ***** TODO [#B] Verify login to the virtual machines > SCHEDULED: <2013-01-11 Tue +1w> DELAY: <2013-01-24 Thu> > > 2. Add a command similar to org-deadline that I can use to attach a delay date to a to-do item > > 3. When I display my agenda, items that are delayed are not displayed. > > My e-lisp is pretty rusty so *any* advice or help is great. Could someone help point me to the right files and functions I'll need to modify to accomplish this? > > Thanks, > Andrew > >