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

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

[emacs-wiki-discuss] Automatically scheduling tasks onto TaskPool (was R


From: Sacha Chua
Subject: [emacs-wiki-discuss] Automatically scheduling tasks onto TaskPool (was Re: Planner - Plan Pages - Tasks)
Date: Thu, 09 Jun 2005 11:14:21 +0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

"Paul D. Kraus" <address@hidden> writes:

> I think I found a solution. I can create a separate plan page for
> project X. then create a task in taskpool that is named project X and
> link to that project page. this way when I look at taskpool I can see
> all projects and tasks and this way I don't have to worry about
> forgetting one of my project pages.

planner-multi.el seems perfect for you, then. Just add (require
'planner-multi) to your ~/.emacs. Here, let me write you some code
that will automatically schedule things onto TaskPool as well as
whatever projects you want. Make sure it's run after you load
planner-multi.

----------------------------------------------------------------
(defadvice planner-create-task-from-buffer (before paul activate)
  "Automatically schedule task onto TaskPool as well as other projects."
  (if plan-page
      (unless (string-match plan-page "TaskPool")
        (setq plan-page (concat plan-page planner-multi-separator "TaskPool")))
    (setq plan-page "TaskPool")))
----------------------------------------------------------------

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?

----------------------------------------------------------------
(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))))))
----------------------------------------------------------------
        
> I can't believe the responses I am getting. I belong to several
> mailing lists but the level of people being involved seems trivial to
> this list. Not to mention I am a newb I was expecting a bunch of links
> to docs files on the net or the typical did you try google response.
> Thanks for the help!

<grin> Thanks! Planner really has a wonderful community. =) When other
newbies come along, I'm sure you'll have ideas and code to share!

-- 
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




reply via email to

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