3

I have several tasks in an org file, some of which which have an Effort property and some of which which don't.

** Example Task 1, with effort
   :PROPERTIES:
   :Effort: 1:30
   :END:
** Example Task 2, without effort
   :PROPERTIES:
   :END:

When I run a match query in the agenda (C-c a m) and want to check by effort, this tutorial suggests the following. Suppose I want to match all todo tasks whose efforts are estimated to be less than 2 hours. I would do:

Match: +Effort<2/TODO

However, this also displays todo items which do not have an Effort property. (Example Task 2 would be shown along with Example Task 1.)

How can I make it so that having no Effort property results in not appearing in an Effort query?

1 Answer 1

0

Just add a condition EFFORT>0 to the search.

For example if the current org-mode buffer contains

** Example Task 1, with effort
   :PROPERTIES:
   :Effort: 1:30
   :END:

** Example Task 2, without effort
   :PROPERTIES:
   :END:

** Example Task 3, with effort
   :PROPERTIES:
   :Effort: 3:00
   :END:

Then C-c a < m EFFORT>0+EFFORT<2 (the first < is to just restrict the search to the current buffer) returns

Headlines with TAGS match: EFFORT>0+EFFORT<2
Press ‘C-u r’ to search again with new search string
  b:          Example Task 1, with effort

If you wish to search on efforts of the form 0:15 etc. then you should enclose all values in double quotes, e.g.

C-c a < m EFFORT>"0"+EFFORT<"0:30"
2
  • Hmm... this seems to work for whole number efforts... but is there a way to search for fractional ones (like 0:15, 0:30, 0:45)? If I search for EFFORT>0+EFFORT<1, I get no results.
    – wiuah
    Commented Oct 30, 2016 at 16:47
  • @wiuah Just add quotes - I have added a final example to demonstrate this. Commented Oct 31, 2016 at 8:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.