* [BUG?] New group tag feature matches too much
@ 2013-04-12 8:29 Christian Moe
2013-04-12 8:46 ` Bastien
0 siblings, 1 reply; 6+ messages in thread
From: Christian Moe @ 2013-04-12 8:29 UTC (permalink / raw)
To: Emacs-orgmode; +Cc: Bastien
Hi,
I was delighted to discover the new group tags feature in 8.0, but I'm
getting strange results trying it out with a sparse tree.
It looks like matching a group tag matches not only the subtags, but
also spuriously matches any tag that *contains* the string of a subtag.
So when I match for the tag 'pop' in the below example, I get not only
Entry 5 which is tagged 'abba', but also Entry 7, tagged
'yabbadabbadoo'. A tag match for 'abba' correctly returns only Entry 5.
Example buffer:
#+TAGS: { a : aa ab } { rock : ac dc } { pop : abba }
* Entry 1 (grouptag) :a:
* Entry 2 (with subtag) :aa:bb:
* Entry 3 (no subtag) :ac:dc:
* Entry 4 (with subtag) :bb:ab:dd:
* Entry 5 (no subtag) :bb:cc:abba:
* Entry 6 (no subtag, no 'a' character in tags) :bb:dc:bbdb:
* Entry 7 (no subtag, 'abba' sequence in tag) :yabbadabbadoo:
* Some sparse tree results
Doing `C-c / m' with the following tags produces the following results:
- rock :: matches Entry 3 and 6, CORRECT
- a :: spurious match of every Entry except 6, the only one without any tag with
an `a' character, WRONG
- Expected: match Entry 1, 2, 4
- ab :: matches Entry 4, CORRECT
- abba :: matches Entry 5, CORRECT (no spurious match of Entry 7)
- pop :: matches Entry 5 and 7, WRONG (spurious match of Entry 7)
Yours,
Christian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG?] New group tag feature matches too much
2013-04-12 8:29 [BUG?] New group tag feature matches too much Christian Moe
@ 2013-04-12 8:46 ` Bastien
2013-04-12 9:45 ` Christian Moe
0 siblings, 1 reply; 6+ messages in thread
From: Bastien @ 2013-04-12 8:46 UTC (permalink / raw)
To: Christian Moe; +Cc: Emacs-orgmode
Hi Christian,
Christian Moe <mail@christianmoe.com> writes:
> It looks like matching a group tag matches not only the subtags, but
> also spuriously matches any tag that *contains* the string of a subtag.
Thanks for testing this and for this detailed bug report.
This is now fixed in master.
Glad you like the feature!
--
Bastien
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG?] New group tag feature matches too much
2013-04-12 8:46 ` Bastien
@ 2013-04-12 9:45 ` Christian Moe
2013-04-12 10:21 ` Bastien
0 siblings, 1 reply; 6+ messages in thread
From: Christian Moe @ 2013-04-12 9:45 UTC (permalink / raw)
To: Bastien; +Cc: Emacs-orgmode
Bastien writes:
> This is now fixed in master.
Tested and confirmed!
> Glad you like the feature!
I've been looking forward to it for a while.
As a "Drupal taxonomy" fan, I think it would be even cooler to get a
multi-level tag tree by nesting groups, e.g.
#+TAGS: { music : { rock : acdc cure } { pop : abba madonna } }
which currently does nothing;
or by chaining them, e.g.
#+TAGS: { rock : acdc cure} {pop: abba madonna} {music : pop rock}
which currently results in this error message:
Invalid regexp: "Unmatched ( or \\("
Yours,
Christian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG?] New group tag feature matches too much
2013-04-12 9:45 ` Christian Moe
@ 2013-04-12 10:21 ` Bastien
2013-04-12 13:07 ` Christian Moe
0 siblings, 1 reply; 6+ messages in thread
From: Bastien @ 2013-04-12 10:21 UTC (permalink / raw)
To: Christian Moe; +Cc: Emacs-orgmode
Hi Christian,
Christian Moe <mail@christianmoe.com> writes:
> As a "Drupal taxonomy" fan, I think it would be even cooler to get a
> multi-level tag tree by nesting groups, e.g.
>
> #+TAGS: { music : { rock : acdc cure } { pop : abba madonna } }
>
> which currently does nothing;
Well, let's first see how useful is the current feature.
> or by chaining them, e.g.
>
> #+TAGS: { rock : acdc cure} {pop: abba madonna} {music : pop rock}
>
> which currently results in this error message:
>
> Invalid regexp: "Unmatched ( or \\("
Your #+TAGS line does not match the correct syntax.
#+TAGS: {rock : acdc cure} {pop : abba madonna} {music : pop rock}
^^^
HTH,
--
Bastien
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG?] New group tag feature matches too much
2013-04-12 10:21 ` Bastien
@ 2013-04-12 13:07 ` Christian Moe
2013-04-12 17:23 ` Bastien
0 siblings, 1 reply; 6+ messages in thread
From: Christian Moe @ 2013-04-12 13:07 UTC (permalink / raw)
To: Bastien; +Cc: Emacs-orgmode
Hi,
Bastien writes:
>> As a "Drupal taxonomy" fan, I think it would be even cooler to get a
>> multi-level tag tree by nesting groups
> Well, let's first see how useful is the current feature.
Fair enough.
> Your #+TAGS line does not match the correct syntax.
>
> #+TAGS: {rock : acdc cure} {pop : abba madonna} {music : pop rock}
> ^^^
Right, thanks. I take it that there have to be spaces around the curly
braces too, since the above doesn't work either, but
#+TAGS: { rock : acdc cure } { pop : abba madonna }
^^^ ^^^
works fine.
Out of curiosity, I tried the chaining experiment again with
#+TAGS: { rock : acdc cure } { pop : abba madonna } { music : pop rock }
and matching for tag "music" gives the same error message:
Invalid regexp: "Unmatched ( or \\("
But that's OK, really, since nested tag groups weren't supposed to work
anyway.
Yours,
Christian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG?] New group tag feature matches too much
2013-04-12 13:07 ` Christian Moe
@ 2013-04-12 17:23 ` Bastien
0 siblings, 0 replies; 6+ messages in thread
From: Bastien @ 2013-04-12 17:23 UTC (permalink / raw)
To: Christian Moe; +Cc: Emacs-orgmode
Christian Moe <mail@christianmoe.com> writes:
> Right, thanks. I take it that there have to be spaces around the curly
> braces too, since the above doesn't work either, but
>
> #+TAGS: { rock : acdc cure } { pop : abba madonna }
> ^^^ ^^^
>
> works fine.
>
> Out of curiosity, I tried the chaining experiment again with
>
> #+TAGS: { rock : acdc cure } { pop : abba madonna } { music : pop rock }
>
> and matching for tag "music" gives the same error message:
>
> Invalid regexp: "Unmatched ( or \\("
>
> But that's OK, really, since nested tag groups weren't supposed to work
> anyway.
Well, the error was not really informative. There is no error now.
I mention group tags limitations in the manual: no nested groups, and
no group tag within another group tag definition.
Thanks again for testing this,
--
Bastien
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-04-12 17:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-12 8:29 [BUG?] New group tag feature matches too much Christian Moe
2013-04-12 8:46 ` Bastien
2013-04-12 9:45 ` Christian Moe
2013-04-12 10:21 ` Bastien
2013-04-12 13:07 ` Christian Moe
2013-04-12 17:23 ` Bastien
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).