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.)
Org-mode uses Emacs' multi-occur command to search for any lines in the agenda files containing a regular expression. Simply type C-c a / followed by a word or regular expression and you will be presented a buffer with all lines that match the query, with each line conveniently linked to its original location.
Emacs does not actually understand you are editing an Org document, yet. To enable Org mode on your current document, type M-x org-mode which will enable the Org mode on the current document. Those are minuses, not underscores.
Emacs has included Org Mode as a major mode by default since 2006. Bastien Guerry is the current maintainer, in cooperation with an active development community. Since its success in Emacs, some other systems now provide functions to work with org files.
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
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" ))
)
)
)
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With