From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: omitting done TODOs from custom agenda Date: Thu, 16 Sep 2010 00:42:48 -0400 Message-ID: <874odq9u47.fsf@archdesk.localdomain> References: <877hiqj7h3.fsf@ericabrahamsen.net> <87k4mpxz7g.fsf@archdesk.localdomain> <87lj75f8l5.fsf@ericabrahamsen.net> <87eicva92g.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=60160 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ow6JA-0008UJ-4I for emacs-orgmode@gnu.org; Thu, 16 Sep 2010 00:42:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ow6J8-0000vd-ET for emacs-orgmode@gnu.org; Thu, 16 Sep 2010 00:42:51 -0400 Received: from out2.smtp.messagingengine.com ([66.111.4.26]:60276) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ow6J8-0000vO-9r for emacs-orgmode@gnu.org; Thu, 16 Sep 2010 00:42:50 -0400 In-Reply-To: <87eicva92g.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Wed, 15 Sep 2010 13:07:35 +0800") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Abrahamsen Cc: emacs-orgmode@gnu.org Eric Abrahamsen writes: > On Tue, Sep 14 2010, Eric Abrahamsen wrote: > >> On Tue, Sep 14 2010, Matt Lundin wrote: >> >>> Eric Abrahamsen 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 complet= ed >>>> items". >>> >>> Would you mind sharing your custom agenda command? >> >> '(org-agenda-custom-commands (quote (("c" "Agenda plus contacts" >> ((agenda "" nil) (tags-todo "TODO=3D\"CONTACT\"" nil) (tags-todo >> "TODO=3D\"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=E2=80=94whatever 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"=20 pulls up only "The quick brown fox," whereas C-c a M TODO=3D"CONTACT" or=20 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=20 '(("c" "Agenda plus contacts" ((agenda "")=20 (todo "CONTACT")=20 (todo "REPLY"))))) --8<---------------cut here---------------end--------------->8--- Best, Matt