Forums

Discuss all things Remember The Milk.

Freaking Gigantic Search Expression (the Sequel)

(closed account) says:
A while ago, I posted my search expression and a lot of people liked it. I've updated it recently, so thought I'd pass it along:

(dueBefore:"now" OR (isRepeating:true AND dueWithin:"2 days of today" NOT timeEstimate:">0 min") OR (isRepeating:false AND dueWithin:"17 days of today" NOT timeEstimate:">0 min") OR (list:"zBooklist" AND dueWithin:"7 days of today") OR (NOT timeEstimate:">0 min" NOT (due:never AND tag:zbooklist))) OR ((due:"tomorrow" AND timeEstimate:"> 1 minute") OR (due:"2 days" AND timeEstimate:"> 1 day") OR (due:"3 days" AND timeEstimate:"> 2 days") OR (due:"4 days" AND timeEstimate:"> 3 days") OR (due:"5 days" AND timeEstimate:"> 4 days") OR (due:"6 days" AND timeEstimate:"> 5 days") OR (due:"7 days" AND timeEstimate:"> 6 days") OR (due: "8 days" AND timeEstimate:"> 7 days") OR (due: "9 days" AND timeEstimate:"> 8 days") OR (due: "10 days" AND timeEstimate:"> 9 days") OR (due: "11 days" AND timeEstimate:"> 10 days") OR (due: "12 days" AND timeEstimate:"> 11 days") OR (due: "13 days" AND timeEstimate:"> 12 days") OR (due: "14 days" AND timeEstimate:"> 13 days") OR (due: "15 days" AND timeEstimate:"> 14 days") OR (due: "16 days" AND timeEstimate:"> 15 days") OR (due: "17 days" AND timeEstimate:"> 16 days") OR (due: "18 days" AND timeEstimate:"> 17 days") OR (due: "19 days" AND timeEstimate:"> 18 days") OR (due: "20 days" AND timeEstimate:"> 19 days") OR (due: "21 days" AND timeEstimate:"> 20 days") OR (due: "22 days" AND timeEstimate:"> 21 days") OR (due: "23 days" AND timeEstimate:"> 22 days") OR (due: "24 days" AND timeEstimate:"> 23 days") OR (due: "25 days" AND timeEstimate:"> 24 days") OR (due: "26 days" AND timeEstimate:"> 25 days") OR (due: "27 days" AND timeEstimate:"> 26 days") OR (due: "28 days" AND timeEstimate:"> 27 days") OR (due: "29 days" AND timeEstimate:"> 28 days") OR (due: "30 days" AND timeEstimate:"> 29 days") OR (due: "31 days" AND timeEstimate:"> 30 days")) NOT (tag:@hold OR tag:@header OR list:zSom-Dreaming OR list:zSom-ProjNurs OR list:zSom-SuggLifeCh OR list:zSom-SuggPurch OR list:LearnBible OR (list:zBooklist AND dueAfter:"7 days of today"))

Here's it broken down:

(dueBefore:"now"

Show me an overdue task no matter what.

OR (isRepeating:true AND dueWithin:"2 days of today" NOT timeEstimate:">0 min")

Show me any recurring tasks that are due within two days of today and otherwise don't have any special show/hide attribute.

OR (isRepeating:false AND dueWithin:"17 days of today" NOT timeEstimate:">0 min")

Show me any non-recurring tasks that are due within 17 days of today and otherwise don't have any special show/hide attribute.

OR (list:"zBooklist" AND dueWithin:"7 days of today")

Show me any items that are on my reading list and due within a week (since I put library books on RTM, this is essentially for that).

OR (NOT timeEstimate:">0 min" NOT (due:never AND tag:zbooklist)))

Or, show me anything that has a empty time estimate but is not just a non-library book on my reading list.

OR ((due:"tomorrow" AND timeEstimate:"> 1 minute") OR [ ... omitted for brevity ... ] (due: "31 days" AND timeEstimate:"> 30 days"))

This is the code necessary to implement hiding tasks in Remember the Milk.

But hide:

NOT (tag:@hold

Stuff I manually tagged to hold.

OR tag:@header

Leftover plan I might reuse someday -- putting the ultimate goal of a list on the top of each list, the @header tag being used to exclude those ultimate goals from smart lists.

OR list:zSom-Dreaming OR list:zSom-ProjNurs OR list:zSom-SuggLifeCh OR list:zSom-SuggPurch

Things on lists that I use in the "dreaming" or "project nursery" sense.

OR list:LearnBible

A project I have to read through the New Oxford Annotated Bible.

OR (list:zBooklist AND dueAfter:"7 days of today"))

Probably unnecessary given other code, but stuff on my reading list that has a due date (thus is a library book), but is due more than a week from now.

All of the above language goes on a "master" Smart List. From there, I apply tags for my actual working lists, so that I don't see home-only tasks on my work list, or work-only tasks on my home list.

Rather than them being inclusive Smart Lists, they're usually exclusive ones. By this, I mean ... well, I can best illustrate by showing you the expression for my work list:

list:@zBoth NOT (tag:@home OR tag:@mac)

In this example, the "master" list I draw from is @zBoth (the "z" prefix pushes it towards the end of my Smart Lists) -- and this Smart List is saying, "Show me everything on @zBoth that does not require that I be at home (@home) or that I have access to my home computer (@mac)."

Were I to have done:

list:@zBoth AND tag:@work

I would have seen only those tasks that needed to be done while out of the house. Anything that could be done either at home or at work (these tasks would have neither the @home nor the @work tag), or anything that had been incompletely tagged wouldn't show up on such a list.
Posted at 8:13pm on November 15, 2008
Log in to post a reply.