简体   繁体   中英

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 Ca 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.)

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"                                                               ))
              )
             )
       )
     )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM