emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug? Group tags not working properly with agenda searches
@ 2018-10-26 21:04 Omari Norman
  2018-11-08 17:23 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Omari Norman @ 2018-10-26 21:04 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1758 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 2770 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug? Group tags not working properly with agenda searches
  2018-10-26 21:04 Bug? Group tags not working properly with agenda searches Omari Norman
@ 2018-11-08 17:23 ` Nicolas Goaziou
  2018-11-14  3:41   ` Omari Norman
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2018-11-08 17:23 UTC (permalink / raw)
  To: Omari Norman; +Cc: emacs-orgmode

Hello,

Omari Norman <omari@smileystation.com> writes:

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

It was a bug, now hopefully fixed. 

Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug? Group tags not working properly with agenda searches
  2018-11-08 17:23 ` Nicolas Goaziou
@ 2018-11-14  3:41   ` Omari Norman
  0 siblings, 0 replies; 3+ messages in thread
From: Omari Norman @ 2018-11-14  3:41 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2276 bytes --]

I tried the Org mode from the Org mode ELPA (org-20181112.tar) but
apparently the bug fix is not in there yet.  But I also tried the one from
the latest Git and it's fixed in there.  Thanks very much.  --Omari

On Thu, Nov 8, 2018 at 12:24 PM Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Omari Norman <omari@smileystation.com> writes:
>
> > 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?
>
> It was a bug, now hopefully fixed.
>
> Thank you.
>
> Regards,
>
> --
> Nicolas Goaziou
>

[-- Attachment #2: Type: text/html, Size: 3283 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-14  3:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-26 21:04 Bug? Group tags not working properly with agenda searches Omari Norman
2018-11-08 17:23 ` Nicolas Goaziou
2018-11-14  3:41   ` Omari Norman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).