emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Re: omitting done TODOs from custom agenda


From: Matt Lundin
Subject: [Orgmode] Re: omitting done TODOs from custom agenda
Date: Thu, 16 Sep 2010 00:42:48 -0400
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Eric Abrahamsen <address@hidden> writes:

> On Tue, Sep 14 2010, Eric Abrahamsen wrote:
>
>> On Tue, Sep 14 2010, Matt Lundin wrote:
>>
>>> Eric Abrahamsen <address@hidden> writes:
>>>
>>>> I'm having a bit of confusion: I've created my own TODO sequences with
>>>> org-todo-keywords, in this case (sequence "CONTACT(n)" "REPLY(r)" "|"
>>>> "CONTACTED(e@)"). Then I've got a custom agenda defined using
>>>> org-agenda-custom-commands, where there's a weekly view on top and some
>>>> TODO items below. When I start this agenda view, and mark one of the
>>>> TODO items as CONTACTED, it doesn't disappear from the agenda view. It's
>>>> very clearly marked as done in the original org file, but it stays in
>>>> agenda. I've looked at all the extra variables for a custom agenda
>>>> command, and there doesn't seem to be one that say "don't show completed
>>>> items".
>>>
>>> Would you mind sharing your custom agenda command?
>>

>> '(org-agenda-custom-commands (quote (("c" "Agenda plus contacts"
>> ((agenda "" nil) (tags-todo "TODO=\"CONTACT\"" nil) (tags-todo
>> "TODO=\"REPLY\"" nil)) nil nil) ("g" "Get It Louder" ((agenda "" nil)
>> (tags-todo "Gil" nil)) nil))))
>
> Looks like the problem here was that CONTACT is a substring of
> CONTACTED—whatever function decides if a todo keyword is pending or
> completed apparently just reads the string until it finds the first
> match (?). I changed it to SENT and everything worked fine. Dunno if
> that's worth considering a bug, but it's certainly surprising behavior.

I'd agree. The tags-todo search does seem to search for all instances of
the substring (CONTACT) rather than the word alone. This seems to be
inconsistent with the behavior of the tags match. E.g., in the following
sample:

--8<---------------cut here---------------start------------->8---
** Testing
*** CONTACT Call so and so
*** CONTACTED Call Mr. Potato Head
*** TODO The quick brown fox                                           :comp:
*** DONE jumped over the lazy dog                                  :computer:
--8<---------------cut here---------------end--------------->8---

C-c a M "comp" 

pulls up only "The quick brown fox," whereas

C-c a M TODO="CONTACT"

or 

C-c a M /CONTACT

pull up both todos containing that substring.

For the time being, have you considered using the todo search instead of
tags-todo? That works correctly on my machine. E.g.,

--8<---------------cut here---------------start------------->8---
(setq org-agenda-custom-commands 
      '(("c" "Agenda plus contacts"
         ((agenda "") 
          (todo "CONTACT") 
          (todo "REPLY")))))
--8<---------------cut here---------------end--------------->8---

Best,
Matt



reply via email to

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