[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [emacs-wiki-discuss] Re: New behavior when marking tasks complete?
From: |
Peter K . Lee |
Subject: |
Re: [emacs-wiki-discuss] Re: New behavior when marking tasks complete? |
Date: |
Thu, 30 Jun 2005 12:11:44 -0400 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/22.0.50 (gnu/linux) |
Sacha Chua <address@hidden> writes:
> "Charles philip Chan" <address@hidden> writes:
>
>>> planner-sort-tasks moves the point around. dev/434 makes sure to keep
>>> the point on the same task if planner-sort-tasks is called, but I
>>> don't know whether that's reasonable behavior. What do people think?
>> I think it should go to the next open task.
>
> Okay. That's probably not a planner-sort-tasks thing, but rather
> something to add to planner-mark-task-hook.
>
> (defun cpc/planner-seek-next-open-task (old-status new-status)
> "Find the next open task."
> (when (string-match status "XC")
> (let ((continue t))
> (while continue
> (if (re-search-forward planner-task-regexp nil t)
> (let ((status (planner-task-status (planner-current-task-info))))
> (unless (string-match status "XC")
> (goto-char (planner-line-beginning-position))
> (setq continue nil)))
> (setq continue nil))))))
> (add-hook 'planner-mark-task-hook 'cpc/planner-seek-next-open-task t)
>
> This positions the point at the beginning of the next open task. You
> can do other things with it, of course... =)
Shouldn't that be (string-match new-status "XC") ?
-Peter
- [emacs-wiki-discuss] New behavior when marking tasks complete?, johnsu01, 2005/06/29
- Re: [emacs-wiki-discuss] New behavior when marking tasks complete?, Charles philip Chan, 2005/06/29
- Re: [emacs-wiki-discuss] New behavior when marking tasks complete?, johnsu01, 2005/06/29
- Re: [emacs-wiki-discuss] New behavior when marking tasks complete?, Charles philip Chan, 2005/06/29
- Re: [emacs-wiki-discuss] New behavior when marking tasks complete?, johnsu01, 2005/06/29
- [emacs-wiki-discuss] Re: New behavior when marking tasks complete?, Sacha Chua, 2005/06/30
- Re: [emacs-wiki-discuss] Re: New behavior when marking tasks complete?, Charles philip Chan, 2005/06/30
- [emacs-wiki-discuss] Re: New behavior when marking tasks complete?, Sacha Chua, 2005/06/30
- Re: [emacs-wiki-discuss] Re: New behavior when marking tasks complete?,
Peter K . Lee <=
- Re: [emacs-wiki-discuss] Re: New behavior when marking tasks complete?, johnsu01, 2005/06/30
- Re: [emacs-wiki-discuss] Re: New behavior when marking tasks complete?, Paul D. Kraus, 2005/06/30
[emacs-wiki-discuss] Re: New behavior when marking tasks complete?, Sacha Chua, 2005/06/30