emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [emacs-wiki-discuss] Automatically scheduling tasks onto TaskPool


From: Peter K . Lee
Subject: Re: [emacs-wiki-discuss] Automatically scheduling tasks onto TaskPool
Date: Thu, 09 Jun 2005 12:02:17 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/22.0.50 (gnu/linux)

Sacha Chua <address@hidden> writes:

> ----------------------------------------------------------------
> (defadvice planner-task-done (after paul activate)
>   "Remove completed tasks from the TaskPool if that still leaves them linked."
>   (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))
>           (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))))))
> ----------------------------------------------------------------

One note on the defadvice above, *if* you happen to also use
`planner-tasks-never-suppress-fixing-flag', which I find to be
extremely handy, then the above routine will remove the wrong tasks.

Marking a task can trigger fixing update, which upon completion, could
have the (planner-current-task-info) point to some other random task
that just happen to sit in the same place post-fix.

You should run the defadvice (before paul activate) to make it safe.

Wait, if you did that, what would happen if you invoke task-done from
the TaskPool page itself?

Wouldn't it mark the next task that happens to take it's place with an X?

Just wondering, is there a way to force the update-fixing to become a
defadvice that always runs *last* around planner-task-done?

-Peter

-- 
B 01110011 01100001 01101001 01101110 01110100
----------------------------------------------
Managing Member @ CORENOVA,LLC. M:919-641-6314
- let them be, just evolve.     O:919-641-6314
----------------------------------------------
56 69 73 69 74  75 73  61 74: www.corenova.com

CORENOVA> ./freedom. intoxicating. <RET>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]