FixMaker
FixMaker

Reputation: 3877

Emacs Org-Mode: How to find all TODOs that don't have a deadline specified

In Emacs org-mode I know that I can call up the agenda "match" view (using C-a m) and then use the following search string to find all TODO items that have their deadline set to today:

DEADLINE="<today>"

However, I want to find all items in my TODO list that don't have any deadline set at all. I've searched but can't seem to find an answer; the following doesn't seem to work either:

DEADLINE=""

How do I search for all TODOs that don't have a DEADLINE specified?

(The same also applies to finding items that haven't been scheduled, but I'm guessing the solution will be the same.)

Upvotes: 17

Views: 4500

Answers (2)

mfcabrera
mfcabrera

Reputation: 781

Another approach would be to use org-agenda-skip-entry. Where I skip the tasks that are scheduled or with a deadline or timestamp and also those that contain the word/tag "desparche".

("X" "Not scheduled"
     ( (todo "TODO"
             (
              (org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled 'deadline 'timestamp 'regexp "desparche"                                                               ))
              )
             )
       )
     )

Upvotes: 1

fgeller
fgeller

Reputation: 501

You can use

-DEADLINE={.+}

and

-SCHEDULED={.+}

which searches for items that don't have a DEADLINE/SCHEDULED tag with any content in it -- ie, no scheduled or deadline dates are set. The curlies are used to identify a regular expression (that matches anything longer than the empty string in this case).

For example, I use the following:

 (setq org-agenda-custom-commands
       `(;; match those tagged with :inbox:, are not scheduled, are not DONE.
         ("ii" "[i]nbox tagged unscheduled tasks" tags "+inbox-SCHEDULED={.+}/!+TODO|+STARTED|+WAITING")))

Reference: http://orgmode.org/manual/Matching-tags-and-properties.html

Upvotes: 12

Related Questions