Query which excludes tasks under set of namespaces

  • You misunderstand namespaces:
    • A task:
      • is not in a namespace
      • is in a block
    • A block:
      • is not in a namespace
      • is in a page
    • A page may or may not be under a namespace:
      • Page P is not in a namespace.
      • Page N/P is in namespace N.
        • or under namespace N
          • Actually N/P reads like:
            • “N over P”
            • “P under N”
    • Task TODO read XYZ from PAC1 from page Readings/Physics :
      • is not under namespace Physics
      • is in a block of a page under namespace Readings
  • I suggest that:
    • you forget about namespaces
    • check instead:
      • the original pagenames
      • along with the original tagnames
      • whether they include any of the undesired strings
        • but being aware of coincidental matches
    • like this:
      (not
        (or-join [?page ?block ?name]
          [?page :block/original-name ?name]
          (and
            [?block :block/refs ?ref]
            [?ref :block/original-name ?name]
          )
        )
        (or
          [(clojure.string/includes? ?name "GialloC")]
          [(clojure.string/includes? ?name "/Physics")]
        )
      )