From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
Received: from mp0 ([2001:41d0:2:4a6f::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms11 with LMTPS
	id lwWXJHuE6F4VGwAA0tVLHw
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Tue, 16 Jun 2020 08:36:11 +0000
Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp0 with LMTPS
	id aKQAIHuE6F6wIgAA1q6Kng
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Tue, 16 Jun 2020 08:36:11 +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 49C4E940B0C
	for <larch@yhetil.org>; Tue, 16 Jun 2020 08:36:10 +0000 (UTC)
Received: from localhost ([::1]:33894 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	id 1jl74h-0003TS-M9
	for larch@yhetil.org; Tue, 16 Jun 2020 04:36:07 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:60846)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <stig@brautaset.org>)
 id 1jl70M-0000l0-14
 for emacs-orgmode@gnu.org; Tue, 16 Jun 2020 04:31:38 -0400
Received: from relay4-d.mail.gandi.net ([217.70.183.196]:34963)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <stig@brautaset.org>)
 id 1jl70J-00069L-BY
 for emacs-orgmode@gnu.org; Tue, 16 Jun 2020 04:31:37 -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 relay4-d.mail.gandi.net (Postfix) with ESMTPSA id A9222E0013;
 Tue, 16 Jun 2020 08:31:26 +0000 (UTC)
From: Stig Brautaset <stig@brautaset.org>
To: Kyle Meyer <kyle@kyleam.com>
Subject: Re: tags-todo org-agenda-custom-command weirdness
In-Reply-To: <87r1ufmw72.fsf@kyleam.com>
References: <m2ftazm3l1.fsf@brautaset.org> <87d061auiw.fsf@kyleam.com>
 <m2bllkxitb.fsf@Margil.fritz.box> <87r1ufmw72.fsf@kyleam.com>
Date: Tue, 16 Jun 2020 09:31:22 +0100
Message-ID: <m2lfknxvhh.fsf@Margil.fritz.box>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=217.70.183.196; envelope-from=stig@brautaset.org;
 helo=relay4-d.mail.gandi.net
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/16 04:31:28
X-ACL-Warn: Detected OS   = Linux 3.11 and newer
X-Spam_score_int: -25
X-Spam_score: -2.6
X-Spam_bar: --
X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7,
 RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001, URIBL_BLOCKED=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." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=subscribe>
Cc: emacs-orgmode@gnu.org
Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org
Sender: "Emacs-orgmode" <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
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: RICM8ifJR4Om

Kyle Meyer <kyle@kyleam.com> writes:

> Stig Brautaset writes:
>
>> 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)
>
> So, provided you've configured org-agenda-todo-ignore-scheduled and
> org-agenda-tags-todo-honor-ignore-options away from their default values
> of nil, the a1-4 behavior you described is as advertised, correct?

I'm not sure. I would have expected that my configured values of
org-agenda-todo-ignore-scheduled and
org-agenda-tags-todo-honor-ignore-options would apply for all a1-4, so
whatever I configure those to the result of a1-4 should be consistent.
It looks like `tags-todo` takes my configured values into account, but
`tags` does not.

>>> 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?
>
> Perhaps it should.  The behavior has been that way for a long time, and
> the code makes it look very deliberate.  That of course is not an
> argument that it should be that way, just one basis for expectations
> (and a reason to be wary of breaking workflows).
>
> And it looks like it was actually supposed to change to your preference
> in 2017.  There was a report [0] that essentially boils down to what
> you're saying, I think.  In response, 942b6267a (org-agenda: `tags-todo'
> command type includes DONE keywords, 2017-04-18) was applied, but then
> reverted for reasons not related to the intended change in behavior [1].
>
> There was then a follow-up in 2fb129b5c (`org-scan-tags' retrieve all
> TODO keywords, not only not-done ones, 2017-08-17).  As far as I can
> tell, that was supposed to achieve the behavior you're after but didn't.
> I don't have time to dig much at the moment, but quickly stepping
> through org-scan-tags, I think the issue is that the MATCHER argument
> still filters out done states.
>
>
> [0] https://orgmode.org/list/CAF96XX0XxhPKjAxy0dQmOiy3rnT+DUok4p1y71F1AwyJaNL-MA@mail.gmail.com/
> [1] https://orgmode.org/list/874lt89fi2.fsf@free.fr/

Thank you for looking into this. I'm going to try to come up with some
tests for the behaviour, and with the help of your references see if I
can get those tests to pass.

Stig