From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OF7HAajD514KQAAA0tVLHw (envelope-from ) for ; Mon, 15 Jun 2020 18:53:28 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 0HthOafD514qDQAAB5/wlQ (envelope-from ) for ; Mon, 15 Jun 2020 18:53:27 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4AEBA9400B1 for ; Mon, 15 Jun 2020 18:53:27 +0000 (UTC) Received: from localhost ([::1]:53150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jkuEY-0001KH-65 for larch@yhetil.org; Mon, 15 Jun 2020 14:53:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38618) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jkuEC-0001Js-FE for emacs-orgmode@gnu.org; Mon, 15 Jun 2020 14:53:04 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:40683) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jkuEA-0007Mh-CU for emacs-orgmode@gnu.org; Mon, 15 Jun 2020 14:53:04 -0400 X-Originating-IP: 82.69.109.251 Received: from localhost (82-69-109-251.dsl.in-addr.zen.co.uk [82.69.109.251]) (Authenticated sender: stig@brautaset.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 6B6A320003; Mon, 15 Jun 2020 18:52:57 +0000 (UTC) From: Stig Brautaset To: Kyle Meyer Subject: Re: tags-todo org-agenda-custom-command weirdness In-Reply-To: <87d061auiw.fsf@kyleam.com> References: <87d061auiw.fsf@kyleam.com> Date: Mon, 15 Jun 2020 19:52:48 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.183.200; envelope-from=stig@brautaset.org; helo=relay7-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/15 13:47:16 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: qEs4DqrVJRV6 Kyle Meyer writes: > Stig Brautaset writes: > >> I'm seeing some weirdness with tags-todo vs tags custom agenda commands. >> Below is the smallest case I've managed to narrow it down to. I would >> *expect* that all the a1-4 commands return the same results, and that >> the b1-4 return the same results. That is not what I'm seeing, however. >> >> (setq-default org-agenda-custom-commands >> '(("a1" "A1" tags-todo "-PROJ/TODO") >> ("a2" "A2" tags "-PROJ/TODO") >> ("a3" "A3" ((tags-todo "-PROJ/TODO"))) >> ("a4" "A4" ((tags "-PROJ/TODO"))) >> >> ("b1" "B1" tags-todo "-PROJ/DONE") >> ("b2" "B2" tags "-PROJ/DONE") >> ("b3" "B3" ((tags-todo "-PROJ/DONE"))) >> ("b4" "B4" ((tags "-PROJ/DONE"))))) >> > > I agree with your expectation that a1-4 should be the same. Why do you > expect that b1-4 would be? Shouldn't tags-todo consider only none-DONE > todo items, in the same spirit as m versus M? In other words, I'd > expect b1 and b3 to be empty by definition. I expected b1-4 to all yield the same result because I expect `tags-todo` to search all TODO-items, not just TODO items where the state is "TODO". >> The effect of a1 & a2 appears identical to eachother, and a3 & a4 too, >> but a1-2 and a3-4 differ (in that the former seems to include scheduled >> items, but the latter does not.) > > It's helpful if you provide a minimal test file. I've tried to come up > with one that I think should capture what you're describing. Mea culpa, I should have done this. > > --8<---------------cut here---------------start------------->8--- > * TODO h1 :PROJ: > * TODO h2 > * DONE h3 :PROJ: > * DONE h4 > * TODO h5 :PROJ: > SCHEDULED: <2020-06-14 Sun> > * TODO h6 > SCHEDULED: <2020-06-14 Sun> > * DONE h7 :PROJ: > SCHEDULED: <2020-06-14 Sun> > * DONE h8 > SCHEDULED: <2020-06-14 Sun> > --8<---------------cut here---------------end--------------->8--- > > With that, a1-4 all show: > > scratch: TODO h2 > scratch: TODO h6 > > That doesn't match what you're seeing. I'm testing with 706970 checked > out, the commit you reported in your follow-up message. For me a2 and a4 returns the same, but a1 and a3 just returns TODO h2. However, I can reproduce what you're seeing by setting this: (setq org-agenda-todo-ignore-scheduled nil) >> What I'm seeing for b1-4 is even weirder. Here I observe b1, b2 and b4 >> have identical behaviour[*], but b3 is the odd one out: while the other >> three return a list of DONE non-project tasks, b3 doesn't find anything. >> >> [*] I suspect the reason b2 and b4 are identical is that I have no >> scheduled DONE tasks. > > For b2 and b4, I see > > scratch: DONE h4 > scratch: DONE h8 > > b1 and b3 are empty, which I think is expected given the tags-todo type. Well, I disagree :-) This behaviour of `tags-todo` seems inconsistent to me. If `todo` can find DONE items, why shouldn't `tags-todo` do the same? Stig