Well now that I’ve started implementation all of my syntax ideas go out the window They all run into issues of one sort or another when I actually start the implementation. Instead I’m going for the simplest solution which is to embed the search in a tag. So from my above example searches will look like:
Do Next Week @search(@due >[d] today and @due <[d] end of next week)
Now I’m not sure why I felt the need to invent a new syntax. The above case “Do Next Week” would be displayed in the sidebar with some searchy icon next to it to distinguish from a normal project, and and when you select it the search will get applied.
No harm in that. I think it’s weird having tags within tags but it would work. Most TP based apps would simply display that line as a note so it shouldn’t be too distracting.
One comment about your implementation plans. I assume this will act like a filter. It would be good if clicking that filter somehow highlighted the filter tag in the document too. Makes editing it easier. It would be a pain to try to edit a filter name by first showing all and then searching for the filter by name.
Got it. The @search tag is still activated as a normal tag upon clicking. That seems wrong. I forgot to put a title in front of it and then went to click and edit. Instead it filtered the view for @search tags. But of course, on the other hand it’s a quick way to see all of the filters.
What’s your recommendation? Place all filters at the head of the document?
I am currently using a plugin for FT that parses natural language dates into ICU dates, and it’s a life-saver. I know you probably don’t want to get into the weeds with that stuff too much, Jesse.
However, is there any chance you could set TP to understand today as a date value? That way somthing like @start>today would make sense.
The implementation is close but has diverged in some details… which I unfortunately haven’t kept careful track of … but for instance FoldingText doesn’t know about the today keyword for [d] searches. Documentation coming… someday.
Not Done @search(not @done)
Do Next Week @search(@due >[d] today and @due <[d] end of next week)
Overdue @search(@due <[d] today or @today except @done)
Available @search(@today or @start <[d] today)
Stuck @search(@deferred or @hold or @waiting and not @done)
All @search()
Filters @search(@search)
@macdrifter I think if I want to keep tags regexable then I think my only solution here to to allow for a ) to be include in tag values is to use an escape sequence such has \). Seems messy, but not sure if I have any other options. Thoughts anyone?
I don’t know, but every time I see an escape sequence I think it was a bad design (flame bait). I totally get what you mean but then I question the original syntax. If that’s the case then would it help to switch the syntax to @search{(@deferred or @hold or @waiting) and not @done} using curly braces?