>>>>> Mark Simpson <[EMAIL PROTECTED]> writes: > Thanks, your fix did the trick... part-way. If my task is on one page > only then it removes it from that page and adds it to CompletedTasks. > But if it is on two pages then it ends up on all three. I'll debug > this a bit more. My gut feeling is that it may have to do with the > distinction between link strings and page names. I may be trying to > string= between the two types instead of normalizing to page names > before comparing.
> Thanks again! Yes. My guess is that the bit I have underlined is not correct (defun planner-gtd-mark-task-hook (old-status new-status) (when (or (string= new-status "C") (string= new-status "X")) (let* ((info (planner-current-task-info)) (links (planner-multi-task-link-as-list info)) (new-links (append (remove planner-welcome-page-name links) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (list (planner-make-link planner-gtd-completed-tasks-page))))) (save-excursion (planner-replan-task (mapconcat 'identity new-links planner-multi-separator))) (when (string= (planner-page-name) planner-welcome-page-name) (planner-find-file (car new-links)) (planner-find-task info)))) nil) since each of links from planner-multi-task-link-as-list will be wrapped in explicit link brackets, the remove won't match anything. It should probably be something like (new-links (append (planner-multi-link-delete links)... I also don't think you need to do the (mapconcat 'identity... part after that, since if the argument to planner-multi-replan-task is a string it is just split into a list again. None of this is tested! Regards, -- Jim Ottaway _______________________________________________ emacs-wiki-discuss mailing list emacs-wiki-discuss@nongnu.org http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss