Browse Source

Agenda: New skipping conditions timestamp and nottimestamp.

The org-agenda-skip-xxx-if functions can now also handle a `timestamp'
and a `nottimestamp' condition.
Carsten Dominik 17 years ago
parent
commit
4e973c6b82
3 changed files with 13 additions and 0 deletions
  1. 2 0
      doc/org.texi
  2. 5 0
      lisp/ChangeLog
  3. 6 0
      lisp/org-agenda.el

+ 2 - 0
doc/org.texi

@@ -10096,6 +10096,8 @@ Skip current entry if it has not been scheduled.
 Skip current entry if it has a deadline.
 Skip current entry if it has a deadline.
 @item '(org-agenda-skip-entry-if 'scheduled 'deadline)
 @item '(org-agenda-skip-entry-if 'scheduled 'deadline)
 Skip current entry if it has a deadline, or if it is scheduled.
 Skip current entry if it has a deadline, or if it is scheduled.
+@item '(org-agenda-skip-entry-if 'timestamp)
+Skip current entry if it has any timestamp, may also be deadline or scheduled.
 @item '(org-agenda-skip-entry 'regexp "regular expression")
 @item '(org-agenda-skip-entry 'regexp "regular expression")
 Skip current entry if the regular expression matches in the entry.
 Skip current entry if the regular expression matches in the entry.
 @item '(org-agenda-skip-entry 'notregexp "regular expression")
 @item '(org-agenda-skip-entry 'notregexp "regular expression")

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2009-02-04  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org-agenda.el (org-agenda-skip-if): New conditions timestamp and
+	nottimestamp.
+
 2009-02-02  Carsten Dominik  <carsten.dominik@gmail.com>
 2009-02-02  Carsten Dominik  <carsten.dominik@gmail.com>
 
 
 	* org.el (org-mode): Make dependence stuff work more reliably.
 	* org.el (org-mode): Make dependence stuff work more reliably.

+ 6 - 0
lisp/org-agenda.el

@@ -2978,6 +2978,8 @@ scheduled     Check if there is a scheduled cookie
 notscheduled  Check if there is no scheduled cookie
 notscheduled  Check if there is no scheduled cookie
 deadline      Check if there is a deadline
 deadline      Check if there is a deadline
 notdeadline   Check if there is no deadline
 notdeadline   Check if there is no deadline
+timestamp     Check if there is a timestamp (also deadline or scheduled)
+nottimestamp  Check if there is no timestamp (also deadline or scheduled)
 regexp        Check if regexp matches
 regexp        Check if regexp matches
 notregexp     Check if regexp does not match.
 notregexp     Check if regexp does not match.
 
 
@@ -3004,6 +3006,10 @@ that can be put into `org-agenda-skip-function' for the duration of a command."
 	   (re-search-forward org-deadline-time-regexp end t))
 	   (re-search-forward org-deadline-time-regexp end t))
       (and (memq 'notdeadline conditions)
       (and (memq 'notdeadline conditions)
 	   (not (re-search-forward org-deadline-time-regexp end t)))
 	   (not (re-search-forward org-deadline-time-regexp end t)))
+      (and (memq 'timestamp conditions)
+	   (re-search-forward org-ts-regexp end t))
+      (and (memq 'nottimestamp conditions)
+	   (not (re-search-forward org-ts-regexp end t)))
       (and (setq m (memq 'regexp conditions))
       (and (setq m (memq 'regexp conditions))
 	   (stringp (nth 1 m))
 	   (stringp (nth 1 m))
 	   (re-search-forward (nth 1 m) end t))
 	   (re-search-forward (nth 1 m) end t))