[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emacs-wiki-discuss] Re: Automatically scheduling tasks onto TaskPool
From: |
Sacha Chua |
Subject: |
[emacs-wiki-discuss] Re: Automatically scheduling tasks onto TaskPool |
Date: |
Thu, 09 Jun 2005 17:56:01 +0800 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) |
Sacha Chua <address@hidden> writes:
> We'll probably need to start thinking about the fact that your task
> pool can get Very, Very Big. Do you want completed tasks to still be
> displayed on your TaskPool? If not, here's another snippet that will
> unschedule tasks from TaskPool when you mark them completed with C-c
> C-x (planner-task-done). Nifty stuff, huh?
Using the newly-committed planner-mark-task-hook, the following code
cooperates with planner-timeclock a bit better.
(defun paul/planner-remove-completed-task-from-pool (old-status new-status)
"Remove completed tasks from the TaskPool if that still leaves them linked.
OLD-STATUS and NEW-STATUS are supplied by from `planner-mark-task'."
(when (string= old-status "X")
(let ((info (planner-current-task-info)))
(when (planner-task-link-text info)
;; If it is linked to TaskPool _and_ at least one other thing
(if (string-match planner-multi-separator (planner-task-link-text info))
(save-excursion
(planner-multi-replan-task
(planner-multi-make-link
(planner-multi-filter-links "^TaskPool$"
(planner-multi-task-link-as-list info) t))))
;; Else if it has a date and is linked to TaskPool
(if (and (planner-task-date info)
(string= (planner-task-link info) "TaskPool"))
(planner-replan-task nil)))))))
(add-hook 'planner-mark-task-hook 'paul/planner-remove-completed-task-from-pool
t)
--
Sacha Chua <address@hidden> - open source geekette
http://sacha.free.net.ph/ - PGP Key ID: 0xE7FDF77C
interests: emacs, gnu/linux, personal information management, CS ed
sachac on irc.freenode.net#emacs . YM: sachachua83
- [emacs-wiki-discuss] Planner - Plan Pages - Tasks, Paul D. Kraus, 2005/06/08
- Message not available
- Re: [emacs-wiki-discuss] Planner - Plan Pages - Tasks, Paul D. Kraus, 2005/06/08
- [emacs-wiki-discuss] Re: Planner - Plan Pages - Tasks, Sacha Chua, 2005/06/08
- Re: [emacs-wiki-discuss] Re: Planner - Plan Pages - Tasks, Paul D. Kraus, 2005/06/08
- Re: [emacs-wiki-discuss] Re: Planner - Plan Pages - Tasks, Patricia J. Hawkins, 2005/06/08
- [emacs-wiki-discuss] Automatically scheduling tasks onto TaskPool (was Re: Planner - Plan Pages - Tasks), Sacha Chua, 2005/06/08
- [emacs-wiki-discuss] Re: Automatically scheduling tasks onto TaskPool,
Sacha Chua <=
- Re: [emacs-wiki-discuss] Automatically scheduling tasks onto TaskPool, Peter K . Lee, 2005/06/09
- [emacs-wiki-discuss] Re: Automatically scheduling tasks onto TaskPool, Sacha Chua, 2005/06/14
- Re: [emacs-wiki-discuss] Mark Task (hooks and fixin's), Peter K . Lee, 2005/06/16
- [emacs-wiki-discuss] Re: Mark Task (hooks and fixin's), Sacha Chua, 2005/06/16
- [emacs-wiki-discuss] Re: Automatically scheduling tasks onto TaskPool, Sacha Chua, 2005/06/10
- Re: [emacs-wiki-discuss] Re: Automatically scheduling tasks onto TaskPool, fouvry+emacs-wiki, 2005/06/10
- Re: [emacs-wiki-discuss] Re: Automatically scheduling tasks onto TaskPool, Alex Polite, 2005/06/10
- [emacs-wiki-discuss] Re: Automatically scheduling tasks onto TaskPool, Sacha Chua, 2005/06/17
[emacs-wiki-discuss] Re: Planner - Plan Pages - Tasks, Jody Klymak, 2005/06/08