Is there a query reference guide?


#1

How does one search for a tag and include the descendants?

In TP2 it went like this-- @today+d .

Is there a reference for the new query structure? Thanks in advance.


#2

Sorry I haven’t done the docs yet. But it’s quite similar to FoldingText’s query language… which is in turn somewhat similar to XPath syntax. For this particular case you could do:

@test//*

Which means:

  1. Look everywhere for items tagged @test … you could also make this more explicit by using the search //@test//*, but the initial // is default.

  2. Then for any @test items that you find match all descendants with //*.

  3. So in the above search it’s only the descendants that are actually matched by the query, but TaskPaper’s behavior is to always show all the ancestors of each match, so you get the results that you want. Again if you wanted to be more explicit you could do: //@test union //@test//* … but you really only need my first example above.


#3

I looked at the Folding-text documentation and that helped to clarify a lot of things. The problem is that I am coming from a background where Taskpaper and Folding-text are completely new to me. I am still not able to figure out how to filter my tasks so that I only see the tasks that are due in two weeks. According to what I could comprehend, it was something like,

@due < 14 today

But that is not returning anything. I followed the suggestion of having all my dates following the @due(YYYY-MM-DD) format. Is that feature something that is going to be implemented soon or am I doing something wrong?


#4

Date searches are at a very early and limited stage. Only the today and tomorrow keywords are understood, and they cannot be combined with numbers, just those keywords. Also to enable a date search you need to use the [d] modifier.

Right now if you want to search two weeks into the future you would need to:

  1. Use a date format (such as YYYY-MM-DD) that sorts alphabetically.

  2. Hard code your target (two weeks ahead of today) date using that same format in your query with a less then operator… the search will just work on strings, but since your date strings sort alphabetically it will work.