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

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

Re: [emacs-wiki-discuss] Trying to write code to move a task to a Comple


From: Jim Ottaway
Subject: Re: [emacs-wiki-discuss] Trying to write code to move a task to a CompletedTask page when completed
Date: Sun, 20 Nov 2005 10:38:33 +0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>>>>> Mark Simpson <address@hidden> writes:

> For my planner-gtd.el project i am trying to move tasks off of the
> 'NextAction' plan page where everything lives to a 'CompletedTasks'
> plan page.  I am trying to do this by writing a hook function for
> planner-mark-task-hook.  But it doesn't seem to be working.  It
> removes the task from NextActions just fine but is not adding it to
> CompletedTasks.

> Perhaps something is going wrong because i am trying to do this in a
> hook function?  Perhaps i should be using an after advice function on
> planner-mark-task?

> When i debug this it looks like planner-replan-task (which is an alias
> for planner-multi-replan-task since i have loaded planner-multi) is
> removing the task but it never adds it to the new page.

That sounds like a bug that I posted a fix for a while ago.  The
relevant patch is:

--- orig/planner-multi.el
+++ mod/planner-multi.el
@@ -328,7 +328,7 @@
     ;; Map over any new pages that were not included
     (setq old-pages (mapcar 'planner-link-base 
(planner-multi-task-link-as-list info)))
     (mapcar (lambda (page)
-              (unless (member (planner-page-name) old-pages)
+              (unless (member (planner-page-name page) old-pages)
                 (planner-find-file page)
                 (if (planner-find-task info)
                     (delete-region (planner-line-beginning-position)

Regards,

-- 
Jim Ottaway




reply via email to

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