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 yA9iAqZU6F6qNQAA0tVLHw
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Tue, 16 Jun 2020 05:12:06 +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 8FqyOaVU6F5qCwAA1q6Kng
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Tue, 16 Jun 2020 05:12:05 +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 04E6994053C
	for <larch@yhetil.org>; Tue, 16 Jun 2020 05:12:04 +0000 (UTC)
Received: from localhost ([::1]:53848 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 1jl3tC-0002jR-9c
	for larch@yhetil.org; Tue, 16 Jun 2020 01:12:02 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:57794)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <kyle@kyleam.com>) id 1jl3so-0002j9-6F
 for emacs-orgmode@gnu.org; Tue, 16 Jun 2020 01:11:38 -0400
Received: from pb-smtp2.pobox.com ([64.147.108.71]:51422)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <kyle@kyleam.com>) id 1jl3sl-0007a7-JH
 for emacs-orgmode@gnu.org; Tue, 16 Jun 2020 01:11:37 -0400
Received: from pb-smtp2.pobox.com (unknown [127.0.0.1])
 by pb-smtp2.pobox.com (Postfix) with ESMTP id 521786F114;
 Tue, 16 Jun 2020 01:11:31 -0400 (EDT) (envelope-from kyle@kyleam.com)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc
 :subject:in-reply-to:references:date:message-id:mime-version
 :content-type; s=sasl; bh=/KTM7ORuT9aUJZ/GrnwxpbKcS3g=; b=fcHO2P
 nl9irDW2Lyn3SdFvqYND6vWhpvp6seNscPHmcDGS8hYisoy7V9Irk3IOEHaFGd1s
 ROPzM+9ChDbk0H7QdZZN1FT5qdxF/+T+MmX9R2O3IRuvv7s07gybVVHotLKXZ3gm
 vH2ZVppR6OYxDJVlJQyn9nSyWMHHuOH8xIgjs=
Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1])
 by pb-smtp2.pobox.com (Postfix) with ESMTP id 4A2D96F113;
 Tue, 16 Jun 2020 01:11:31 -0400 (EDT) (envelope-from kyle@kyleam.com)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com;
 h=from:to:cc:subject:in-reply-to:references:date:message-id:mime-version:content-type;
 s=mesmtp; bh=odBbAwNk+q//KQ+QPQc9o8Sv0r7fJDkxVn0OmE7G+Sc=;
 b=AdcR6VI5X8kTHLRPWDF6nJmcd0YFC7KXOm3LCnOsxStcMNf8S4ZHXRaY6PZh6m0mLfz+ZL1/8eR7ZVmhD/+Z4vMJicoi1Wq2Fc/Zh75nuUwig3BHSq5HHRc+qKbpZK3DWCY7ujZkn24MTsYQZDtiE9gbyA707/BzwPsnHt8aGIU=
Received: from localhost (unknown [45.33.91.115])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 7E9E16F112;
 Tue, 16 Jun 2020 01:11:30 -0400 (EDT) (envelope-from kyle@kyleam.com)
From: Kyle Meyer <kyle@kyleam.com>
To: Stig Brautaset <stig@brautaset.org>
Subject: Re: tags-todo org-agenda-custom-command weirdness
In-Reply-To: <m2bllkxitb.fsf@Margil.fritz.box>
References: <m2ftazm3l1.fsf@brautaset.org> <87d061auiw.fsf@kyleam.com>
 <m2bllkxitb.fsf@Margil.fritz.box>
Date: Tue, 16 Jun 2020 05:11:29 +0000
Message-ID: <87r1ufmw72.fsf@kyleam.com>
MIME-Version: 1.0
Content-Type: text/plain
X-Pobox-Relay-ID: D6B0DFCC-AF8F-11EA-8FB8-D1361DBA3BAF-24757444!pb-smtp2.pobox.com
Received-SPF: pass client-ip=64.147.108.71; envelope-from=kyle@kyleam.com;
 helo=pb-smtp2.pobox.com
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/16 01:11:31
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x [generic] [fuzzy]
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, 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=pass header.d=pobox.com header.s=sasl header.b=fcHO2P n;
	dkim=pass header.d=kyleam.com header.s=mesmtp header.b=AdcR6VI5;
	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.21
X-TUID: i6nIJ1UfwTw3

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?

>> 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/