From: Martin Kampas <martin.kampas@ubedi.net>
To: emacs-orgmode@gnu.org
Subject: Bug: Matching tags: results incomplete when mixing group tags and their ancestors [9.1.7 (9.1.7-12-g74f6ed-elpaplus @ /home/martin/.emacs.d/elpa/org-plus-contrib-20180305/)]
Date: Mon, 12 Mar 2018 08:31:17 +0100 [thread overview]
Message-ID: <16731993.gXpk8AjVC7@5th> (raw)
Hi,
Here is an example Org file:
------------
#+TAGS: [ tag1 : tag2 ] [ tag2 : tag3 ] [ tag3 : tag4 ]
* Tag1 :tag1:
* Tag2 :tag2:
* Tag3 :tag3:
* Tag4 :tag4:
------------
Searching headlines by tags works well unless you combine a group tag together with some of its ancestor tags in the query.
1) GOOD - Searching for "tag1" marks all four headlines.
2) GOOD - Searching for "tag3" marks headlines "Tag3" and "Tag4".
3) BAD - Searching for "tag1+tag3" marks just headline "Tag3" providing an incomplete result. Expected result: headlines "Tag3" and "Tag4" are marked.
With more complex tag set it may happen quite easily that such a search is done.
The bug seems to be in org-tags-expand.
(org-tags-expand "tag1")
#("{\\<\\(?:tag[1-4]\\)\\>}" 0 20 (grouptag t))
(org-tags-expand "tag3")
#("{\\<\\(?:tag[34]\\)\\>}" 0 19 (grouptag t))
(org-tags-expand "tag1+tag3")
#("{\\<\\(?:tag[1-4]\\)\\>}+tag3" 0 20 (grouptag t))
In the third invocation "tag3" was left unexpanded.
Best regards,
Martin
Emacs : GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
of 2018-02-09
Package: Org mode version 9.1.7 (9.1.7-12-g74f6ed-elpaplus @ /home/martin/.emacs.d/elpa/org-plus-contrib-20180305/)
next reply other threads:[~2018-03-12 7:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-12 7:31 Martin Kampas [this message]
2018-03-15 14:44 ` Bug: Matching tags: results incomplete when mixing group tags and their ancestors [9.1.7 (9.1.7-12-g74f6ed-elpaplus @ /home/martin/.emacs.d/elpa/org-plus-contrib-20180305/)] Martin Kampas
2018-03-16 22:05 ` Nicolas Goaziou
2018-03-21 1:14 ` Bastien
2018-03-22 5:32 ` Martin Kampas
2018-03-22 8:22 ` Bastien Guerry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16731993.gXpk8AjVC7@5th \
--to=martin.kampas@ubedi.net \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).