1A [[PageSpec]] that is entirely negated terminals, such as "!foo and !bar" 2matches all other pages, including all internal pages. This can lead to 3unexpected results, since it will match a bunch of recentchanges pages, 4etc. 5 6Recall that internal-use pages are not matched by a glob. So "\*" doesn't 7match them. So if the pagespec is "\* and !foo and !bar", it won't match 8them. This is the much more common style. 9 10There's an odd inconsistency with entirely negated pagespecs. If "!foo" 11matches page bar, shouldn't "" also match bar? But, the empty pagespec is 12actually special-cased to not match anything. 13 14Indeed, it seems what would be best would be for "!foo" to not match any 15pages, unless it's combined with a terminal that positively matches pages 16("* and !foo"). Although this would be a behavior change, with transition 17issues. 18 19Another approach would be to try to detect the case of an entirely negated 20pagespec, and implicitly add "and !internal()" to it. 21 22Either approach would require fully parsing the pagespec. And consider cases 23like "!(foo and !bar)". Doesn't seem at all easy to solve. --[[Joey]] 24 25> It occurs to me that at least one place in ikiwiki optimizes by assuming 26> that pagespecs not mentioning the word "internal" never match internal 27> pages. I wonder whether this bug could be solved by making that part of 28> the definition of a pagespec, rather than a risky optimization 29> like it is now? That seems strange, though - having this special case 30> would make pagespecs significantly harder to understand. --[[smcv]] 31