From mboxrd@z Thu Jan 1 00:00:00 1970 From: Omari Norman Subject: Bug? Group tags not working properly with agenda searches Date: Fri, 26 Oct 2018 17:04:42 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000030124505792812c5" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gG9Hv-0002rh-Nr for emacs-orgmode@gnu.org; Fri, 26 Oct 2018 17:05:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gG9Hs-00073F-Ee for emacs-orgmode@gnu.org; Fri, 26 Oct 2018 17:04:59 -0400 Received: from mail-lf1-f46.google.com ([209.85.167.46]:42356) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gG9Hs-00072u-72 for emacs-orgmode@gnu.org; Fri, 26 Oct 2018 17:04:56 -0400 Received: by mail-lf1-f46.google.com with SMTP id q6-v6so1915339lfh.9 for ; Fri, 26 Oct 2018 14:04:55 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --00000000000030124505792812c5 Content-Type: text/plain; charset="UTF-8" Hello, First of all, thank you for org-mode. Without it, I literally would find it much more difficult to do my job. I am having a problem with group tags. I reproduced it using the latest org-mode from the org package archive, 20181022. The minimal example is this: say I have a group tag that looks like this: (setq org-tag-alist '((:startgrouptag) ("parentTag") (:grouptags) ("childTag1") ("childTag2") (:endgrouptag))) with a org-todo-keywords like so: (setq org-todo-keywords '((type "TODO" "NEXT" "|" "DONE" "CANCELLED"))) And then an org file that looks like this: * Parent heading 1 :childTag1: ** NEXT child 1 of parent 1 ** TODO child 2 of parent 1 * Parent heading 2 ** NEXT child 1 of parent 2 ** TODO child 2 of parent 2 Then when I hit C-c a M, I use this match string: parentTag&TODO="NEXT"|-parentTag&TODO="TODO" I would expect the resulting agenda to have exactly two items: "child 1 of parent 1", and "child 2 of parent 2". However, I get three items: "child 1 of parent 1", "child 2 of parent 1", and "child 2 of parent 2". I don't understand why "child 2 of parent 1" is in there. This only arises when using the "|" operator. That is, if I do an agenda with just parentTag&TODO="NEXT" then I get just "child 1 of parent 1", as expected. If I do an agenda with -parentTag&TODO="TODO" then I get just "child 2 of parent 2", as expected. But when I combine them with "|", I get three items. I also did some other tests showing that at least for me this problem arises only with group tags. In particular, here if I do childTag1&TODO="NEXT"|-childTag1&TODO="TODO" I get just the two items I would expect. Is there a bug here? Or am I doing something wrong? Thanks. --Omari --00000000000030124505792812c5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,<= div>
First of all, thank you for org-mode.=C2=A0 Without it, = I literally would find it much more difficult to do my job.

<= /div>
I am having a problem with group tags.=C2=A0 I reproduced it usin= g the latest org-mode from the org package archive, 20181022.=C2=A0 The min= imal example is this: say I have a group tag that looks like this:

(setq org-tag-alist
=C2=A0 =C2=A0 =C2=A0 &#= 39;((:startgrouptag)
=C2=A0 =C2=A0 =C2=A0 ("parentTag")=
=C2=A0 =C2=A0 =C2=A0 (:grouptags)
=C2=A0 =C2=A0 =C2=A0= ("childTag1")
=C2=A0 =C2=A0 =C2=A0 ("childTag2&qu= ot;)
=C2=A0 =C2=A0 =C2=A0 (:endgrouptag)))

with a org-todo-keywords like so:

(setq o= rg-todo-keywords '((type "TODO" "NEXT" "|"= ; "DONE" "CANCELLED")))

An= d then an org file that looks like this:

* Pa= rent heading 1 :childTag1:
** NEXT child 1 of parent 1
= ** TODO child 2 of parent 1

* Parent heading 2
** NEXT child 1 of parent 2
** TODO child 2 of parent 2

Then when I hit C-c a M, I use this match stri= ng:

parentTag&TODO=3D"NEXT"|-parentT= ag&TODO=3D"TODO"

I would expect the = resulting agenda to have exactly two items: "child 1 of parent 1"= , and "child 2 of parent 2".=C2=A0 However, I get three items: &q= uot;child 1 of parent 1", "child 2 of parent 1", and "c= hild 2 of parent 2".=C2=A0 I don't understand why "child 2 of= parent 1" is in there.

This only arises when= using the "|" operator.=C2=A0 That is, if I do an agenda with ju= st

parentTag&TODO=3D"NEXT"

then I get just "child 1 of parent 1", as expecte= d.=C2=A0 If I do an agenda with

-parentTag&TOD= O=3D"TODO"

then I get just "child 2= of parent 2", as expected.=C2=A0 But when I combine them with "|= ", I get three items.

I also did some other t= ests showing that at least for me this problem arises only with group tags.= =C2=A0 In particular, here if I do

childTag1&T= ODO=3D"NEXT"|-childTag1&TODO=3D"TODO"
I get just the two items I would expect.

Is there a bug here?=C2=A0 Or am I doing something wrong?=C2=A0 Thanks. = =C2=A0--Omari

--00000000000030124505792812c5--