From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1 with LMTPS id WD54Lb30i15FbgAAk0OIDg (envelope-from ) for ; Tue, 07 Apr 2020 03:34:21 +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 aHKeDrz0i15YVQAA1q6Kng (envelope-from ) for ; Tue, 07 Apr 2020 03:34:20 +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 1931894A233 for ; Tue, 7 Apr 2020 03:34:18 +0000 (UTC) Received: from localhost ([::1]:40546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLf0A-00080l-Kz for larch@yhetil.org; Mon, 06 Apr 2020 23:34:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47318) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLezi-00080X-P1 for emacs-orgmode@gnu.org; Mon, 06 Apr 2020 23:33:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLezh-00030j-3t for emacs-orgmode@gnu.org; Mon, 06 Apr 2020 23:33:46 -0400 Received: from pb-smtp21.pobox.com ([173.228.157.53]:54550) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jLezc-0002xw-LA; Mon, 06 Apr 2020 23:33:41 -0400 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id E4BD6CF8E9; Mon, 6 Apr 2020 23:33:37 -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:date:message-id:mime-version:content-type; s=sasl; bh=olR8ueEKZXz6+cjMi+dr8vmNb+0=; b=Pyj9rkYcUJeAaKqAIOQi TL08DKZrjrgzJ64aEhS/tv4O7f1HNk4YbqvVe5xnedXtFSQe7hj8Sh/9LJPNTSFP HwAr4opmHweyCAHBEK+QtDkLC1PHjfrlM71iiAVOcC14qVRGluRNq+Hf+z6rlyBh d2Pg9/+LttRu1GXjVA15M8I= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id DC86ECF8E8; Mon, 6 Apr 2020 23:33:37 -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:date:message-id:mime-version:content-type; s=mesmtp; bh=BCCUaT42upYaQXeCRVsCiGn5p+TFN26XsJ49GqEnvDs=; b=hxoDf91R6hMf7+sDSQxWFZJgZgsLjxJmIzJjaVGoNuLGfzBAa2PigkriVDv9EqGiectdzhwJRCWRfbxVmBaHPcejLavWW0OAq8h8K+D0tWQlJXp+oufOteGMjlW78KQP+F664fHtVR5RIUGc9c2Ynz4vje6E0AHsnS2cusvx08E= 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-smtp21.pobox.com (Postfix) with ESMTPSA id 53024CF8E7; Mon, 6 Apr 2020 23:33:35 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: "Jorge P. de Morais Neto" Subject: Re: Bug: org-agenda-tag-filter-preset not respected [9.3.6 (9.3.6-19-gf360f9-elpaplus @ /home/jorge/.config/emacs/elpa/27.0/develop/org-plus-contrib-20200302/)] In-Reply-To: <87r1x0a8mc.fsf@nicolasgoaziou.fr> Date: Tue, 07 Apr 2020 03:33:33 +0000 Message-ID: <87369g0y2a.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 8FE5670C-7880-11EA-B42F-8D86F504CC47-24757444!pb-smtp21.pobox.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 173.228.157.53 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: Bastien , emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=default; t=1586230459; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=zug+03/pf59K7nArmpoTd2Ugy8o36sFW4ftEkCFHGxc=; b=CMpSaJzjqBbv26wO1QFL/4dIgB+VNSuRS4FllvVVrWuY76MAEqLXEIYH5iyQ9xMxApKbUQ 9Z04LG5Yl6MlaGghdTOp5EbBkGsNlRwMfMGb8xjD2Ibz+AVNdCZGT8QePG9nz/+Ql793lt ipba885dsRYb9axEHHrxZV4u2WJMmkg= ARC-Seal: i=1; s=default; d=yhetil.org; t=1586230459; a=rsa-sha256; cv=none; b=Oq9LoaC78EPQUre/eg3uzz5JMQRl+RGkguY4q9JmdrbKF/K3tLof/rdMp9Rxpz4hEXtKWa yHbJh+yJirLWSqaHx418I5EUqnEldtmAXe9LyT6PLNyknqHrRAKyGB4hp4ev0iyEdZxZ2n cfq2AbdLUFRzA84gg8XertO4j1BsZxo= ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=pobox.com header.s=sasl header.b=Pyj9rkYc; dkim=fail (rsa verify failed) header.d=kyleam.com header.s=mesmtp header.b=hxoDf91R; 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-Scanner: scn0 X-Spam-Score: -0.01 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=pobox.com header.s=sasl header.b=Pyj9rkYc; dkim=fail (rsa verify failed) header.d=kyleam.com header.s=mesmtp header.b=hxoDf91R; 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-Scan-Result: default: False [-0.01 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.58285088891046]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.32), country: US(-0.01), ip: 209.51.188.17(-0.58)]; R_DKIM_REJECT(1.00)[pobox.com:s=sasl,kyleam.com:s=mesmtp]; ARC_SIGNED(0.00)[i=1]; DKIM_TRACE(0.00)[pobox.com:-,kyleam.com:-]; MX_GOOD(-0.50)[eggs.gnu.org]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; TAGGED_FROM(0.00)[larch=yhetil.org]; MID_RHS_MATCH_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[kyle@kyleam.com,emacs-orgmode-bounces@gnu.org]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TAGGED_RCPT(0.00)[list]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[kyleam.com]; HAS_LIST_UNSUB(-0.01)[]; RCVD_COUNT_SEVEN(0.00)[8]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: 7YZaWu3hbijl Nicolas Goaziou writes: > Unfortunately, no one volunteered to fix the issue so far. You may want > to have a look at it, you will certainly get help doing so. Otherwise, > you are welcome to bump the report from time to time. This bisects to 7e52b7661 (org-agenda: Fix logic of `org-agenda-filter-make-matcher', 2020-02-19). Jorge, I tested the patch below against the test case you provided, though of course confirmation that it resolves the issue on your end would be appreciated. I'll apply it tomorrow unless there are objections. -- >8 -- Subject: [PATCH] agenda: Fix regression in handling of non-caterory filters * lisp/org-agenda.el (org-agenda-filter-make-matcher): Combine filter forms with `and' unless multiple positive categories are given. 06cf532f4 (org-agenda.el: Fix bug when using category filters, 2020-01-20) modified org-agenda-filter-make-matcher to group the form with `or' rather than `and' for category filters. This logic was tweaked again in a follow-up commit, 7e52b7661 (org-agenda: Fix logic of `org-agenda-filter-make-matcher', 2020-02-19), which was supposed to restrict the use of `or' to _multiple_ positive categories. However, the follow-up commit incorrectly affected all filter types. Avoid the check for non-category types. Also, fix the regexp so that it matches whenever there are multiple positive categories, not just a single one. --- * I'm tempted to drop the multi-pos-cats binding and move the expression in line. I may do that before applying. * I'm not really sure what the behavior should be when there are multiple "+"s and at least one "-". I doubt that there's much sensible to do here, or that it matters one way or the other. lisp/org-agenda.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index d89a3da7c..ffb892b0c 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7948,8 +7948,10 @@ (defun org-agenda-filter-make-matcher (filter type &optional expand) argument EXPAND can be used for the TYPE tag and will expand the tags in the FILTER if any of the tags in FILTER are grouptags." (let ((multi-pos-cats - (string-match-p "\++" - (mapconcat (lambda (cat) (substring cat 0 1)) filter ""))) + (and (eq type 'category) + (string-match-p "\\+.*\\+" + (mapconcat (lambda (cat) (substring cat 0 1)) + filter "")))) f f1) (cond ;; Tag filter -- 2.26.0