Search shortcuts expansion

The corresponding section in the TaskPaper User’s Guide says followings:

These are the shortcut forms and what they expand to:

  • project expands to @type = project and
  • task expands to @type = task and
  • note expands to @type = note and

However, there are different edge cases, where the expansion behavior is not so clear:

  • project at the end of the search string expands to @type = project (and is omitted)
  • project task seems to expand to @type = project and task (task is not expanded)
  • project or task expands to something, what never yields any results.
  • etc.

So the question is, actually, how these and other edge cases are handled by the shortcut expansion algorithm.

Hum… I think something off. Need to look into things further.

Right now I’m only expanding at the start of each path step. I’m not sure why I did it this way, at the moment it seems to me that it would have made more sense to parse it as predicate so that expansion would work when combined with and/or/not. I’m looking into this now.