Marvin Help

Advanced filters made simple (RPN explained)

The Advanced filter in a smart list lets you describe almost any list you can think of. It uses a way of writing called RPN (Reverse Polish Notation). The name sounds scary, but there is really only one rule to learn.

You find the Advanced filter at the very bottom of the Filters column when you create or edit a smart list. New to smart lists? Start with Smart Lists (Lists page).

The one rule: the joining word goes last

Normally you would write:

Quick OR Easy

In RPN you write the two things first, and the joining word last:

Quick Easy OR

That is the whole idea. Instead of words, Marvin uses short symbols:

  • || means OR (either one, or both). Example: @Quick @Easy || means Quick or Easy.

  • && means AND (both). Example: @Quick #Work && means Quick and in Work.

  • ! means NOT. Example: #Hobby ! means not in Hobby.

|| and && join the two things in front of them. ! only needs one thing in front of it.

Naming things

  • A label: @ and the label name, for example @Quick

  • A category or project: # and its name, for example #Work

  • A goal: ## and the goal name, for example ##Fitness

  • A priority: * and the star, for example *"red star", *"orange star" or *"yellow star"

Good to know:

  • Names with spaces need quotes: @"Waiting for", #"Big Project".

  • Capital letters don't matter: @quick and @Quick are the same.

  • A category includes everything inside it: #Work also matches tasks inside the projects that are in Work.

  • Put a space between everything: @Quick @Easy ||, not @Quick@Easy||.

Start simple: one thing

You don't always need a symbol. One thing on its own works fine.

  • Everything with the label Quick: @Quick

  • Everything in Work: #Work

  • Everything with a red star: *"red star"

Two things

Write both things, then the symbol.

  • Quick OR Easy: @Quick @Easy ||

  • Quick AND in Work: @Quick #Work &&

  • Labelled both Home AND Quick: @Home @Quick &&

  • Red star OR orange star: *"red star" *"orange star" ||

  • In Work AND red star: #Work *"red star" &&

Leaving things out with NOT

Put ! right after the thing you want to leave out.

  • Everything NOT in Hobby: #Hobby !

  • Everything WITHOUT the label Waiting for: @"Waiting for" !

  • Quick, but NOT in Hobby: @Quick #Hobby ! &&

  • Neither Quick NOR Easy: @Quick ! @Easy ! &&

Read the third one from left to right: "Quick", then "Hobby, NOT" (so: not in Hobby), then "AND" joins the two. Quick and not in Hobby.

Three or more things

Each || or && joins exactly two things. So with three things you need two symbols.

  • Quick OR Easy OR Short: @Quick @Easy || @Short ||

  • The same thing written another way: @Quick @Easy @Short || ||

  • Quick AND in Work AND red star: @Quick #Work && *"red star" &&

Warning

A common mistake: @Quick @Easy @Short ||| does not work. There is no ||| symbol. Write || || (with a space) instead.

The easiest way to build a longer filter is one step at a time: add a thing, then its symbol, then the next thing, then its symbol.

  1. Start with @Quick @Easy || (Quick or Easy).

  2. Add @Short || (or Short).

  3. Result: @Quick @Easy || @Short ||

Mixing AND and OR

This is where RPN shines, because you never need brackets. Whatever should happen first, write first.

Example: Quick tasks in Home or Work

In normal writing: Quick AND (Home OR Work).

  1. The part in brackets comes first: #Home #Work ||

  2. Then add Quick and AND: @Quick &&

  3. Result: #Home #Work || @Quick &&

Example: Quick tasks that aren't hobbies, plus anything with a red star

In normal writing: (Quick AND NOT Hobby) OR red star.

  1. First part: @Quick #Hobby ! &&

  2. Then add red star and OR: *"red star" ||

  3. Result: @Quick #Hobby ! && *"red star" ||

Example: Red star tasks in Work, or anything overdue

  1. First part: #Work *"red star" &&

  2. Then: deadlineOverdue ||

  3. Result: #Work *"red star" && deadlineOverdue ||

How Marvin reads it (to check your work)

Not sure a filter says what you mean? Read it the way Marvin does:

  1. Go from left to right.

  2. When you reach a symbol, take the one or two things right before it and combine them into one.

  3. Keep going until only one thing is left.

Let's read #Home #Work || @Quick &&:

  1. #Home #Work || becomes "Home or Work".

  2. Now we have "Home or Work" @Quick &&.

  3. && joins the two things before it: "Home or Work, and Quick". Done.

Durations

These need the Time Estimates feature. Use ~ and a number with m (minutes) or h (hours).

  • Shorter than 15 minutes: <~15m

  • 1 hour or longer: >=~1h

  • Exactly 30 minutes: ~30m

  • Between 10 and 20 minutes: >=~10m <=~20m &&

  • No time estimate: noTimeEstimate

  • Quick tasks in Work: <~15m #Work &&

Tasks without a time estimate never count as "shorter than".

Dates

For dates you write the date, then what to compare it with, then the comparison. 7d means "7 days from today" and -7d means "7 days ago". You can also use w for weeks and m for months.

  • Due in the next 7 days (overdue included): dueDate 7d <=

  • Due today: dueToday

  • Overdue: deadlineOverdue

  • Has a due date: hasDeadline

  • No due date: dueDate !

  • Created in the last 7 days: creationDate -7d >=

  • Scheduled for today: +today

  • Not scheduled: isUnscheduled

  • Planned for this week, or not planned at all: &thisWeek &unplanned ||

The comparisons are < (before), <= (on or before), > (after), >= (on or after) and == (the same).

Other handy building blocks

  • Only tasks: type:task

  • Only projects: type:project

  • Title contains "call": title:call

  • Title contains "call mom": title:"call mom"

  • Has any priority: isStarred

  • Has no priority: noPriority

  • Projects with no next step: missingNextStep

  • Tasks inside red star projects: parent(*"red star")

  • Has a note: hasNote

  • Delayed 3 or more days: procrastinationCount 3 >=

As you type in the Advanced box, Marvin suggests the building blocks it knows, so you don't have to remember them. There are many more than shown here. The full list is in Advanced Smart List Filters.

Ready-to-copy examples

Change the label and category names to your own.

  • Quick wins at home: <~15m #Home &&

  • Important and due soon: *"red star" dueDate 7d <= &&

  • Waiting for anything at work: @"Waiting for" #Work &&

  • Errands or calls: @Errand @Call ||

  • Work tasks, but no meetings: #Work @Meeting ! &&

  • Unscheduled work with a red star: #Work *"red star" && isUnscheduled &&

  • Quick or easy, but not hobbies: @Quick @Easy || #Hobby ! &&

  • Home or Garden, due this week: #Home #Garden || dueDate 7d <= &&

  • Old tasks that never got scheduled: creationDate -30d < isUnscheduled &&

When it doesn't work

Marvin shows a message under the Advanced box when something is wrong. The most common ones:

  • "Too many arguments left... Maybe you forgot && or ||?" You have two or more things with nothing joining them, like @Quick @Easy. Add || or && at the end.

  • "...failed since there weren't enough arguments" A symbol doesn't have enough things in front of it, like @Quick ||. Add the missing thing before the symbol.

  • "Unrecognized token" Marvin doesn't know a word. Use && instead of "and", || instead of "or" and ! instead of "not", and check the spelling.

Also check:

  • The label or category name is spelled right. A label that doesn't exist simply matches nothing, without an error.

  • Names with spaces have quotes: @"Waiting for".

  • The preview on the right of the smart list dialog. It updates as you type, so you can see straight away if the list looks right.

Still stuck? Write to us and tell us in plain words what you want the list to show. We'll send you the filter.