From a74520c2231b74a6915b0e7d2f593834a9fc6014 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Mon, 10 Jun 2019 16:49:06 -0500 Subject: [PATCH] Docs: (deadline) Mention org-deadline-warning-days --- README.org | 3 ++- org-ql.el | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.org b/README.org index 2d7150e..d43251b 100644 --- a/README.org +++ b/README.org @@ -90,7 +90,8 @@ Note that, for convenience, standard numeric comparator function symbols (~<~, ~ + ~category (&optional categories)~ :: Return non-nil if current heading is in one or more of ~CATEGORIES~ (a list of strings). + ~clocked (&key from to on)~ :: Return non-nil if current entry was clocked in given period. If no arguments are specified, return non-nil if entry was clocked at any time. If ~FROM~, return non-nil if entry was clocked on or after ~FROM~. If ~TO~, return non-nil if entry was clocked on or before ~TO~. If ~ON~, return non-nil if entry was clocked on date ~ON~. ~FROM~, ~TO~, and ~ON~ should be strings parseable by ~parse-time-string~ but may omit the time value. Note: Clock entries are expected to be clocked out. Currently clocked entries (i.e. with unclosed timestamp ranges) are ignored. + ~closed (&optional comparator target-date)~ :: Return non-nil if entry's closed date compares with ~TARGET-DATE~ using ~COMPARATOR~. ~TARGET-DATE~ should be a string parseable by ~date-to-day~. ~COMPARATOR~ should be a function (like ~<=~). -+ ~deadline (&optional comparator target-date)~ :: Return non-nil if entry's deadline compares with ~TARGET-DATE~ using ~COMPARATOR~. ~TARGET-DATE~ should be a string parseable by ~date-to-day~. ~COMPARATOR~ should be a function (like ~<=~). ++ ~date (&optional comparator target-date type)~ :: Return non-nil if Org entry at point has date of ~TYPE~ that compares with ~TARGET-DATE~ using ~COMPARATOR~. Checks all Org-formatted timestamp strings in entry. ~TYPE~ may be ~active~, ~inactive~, or ~all~, to control whether active, inactive, or all timestamps are checked. Ranges of each type are also checked. ~TARGET-DATE~ should be a string parseable by ~date-to-day~. ~COMPARATOR~ should be a function (like ~<=~). ++ ~deadline (&optional comparator target-date)~ :: Return non-nil if entry's deadline compares with ~TARGET-DATE~ using ~COMPARATOR~. ~TARGET-DATE~ should be a string parseable by ~date-to-day~; or if omitted, it is determined automatically using ~org-deadline-warning-days~. ~COMPARATOR~ should be a function (like ~<=~). + ~done~ :: Return non-nil if entry's ~TODO~ keyword is in ~org-done-keywords~. + ~habit~ :: Return non-nil if entry is a habit. + ~heading (regexp)~ :: Return non-nil if current entry's heading matches ~REGEXP~ (a regexp string). diff --git a/org-ql.el b/org-ql.el index 2383bb2..9dcff25 100644 --- a/org-ql.el +++ b/org-ql.el @@ -664,8 +664,10 @@ COMPARATOR should be a function (like `<=')." (org-ql--defpredicate deadline (&optional comparator target-date) "Return non-nil if entry's deadline compares with TARGET-DATE using COMPARATOR. -TARGET-DATE should be a string parseable by `date-to-day'. -COMPARATOR should be a function (like `<=')." +TARGET-DATE should be a string parseable by `date-to-day'; or if +omitted, it is determined automatically using +`org-deadline-warning-days'. COMPARATOR should be a +function (like `<=')." ;; NOTE: This was a defsubst before being defined with the macro. Might be good to make it a defsubst again. ;; FIXME: This is slightly confusing. Using plain (deadline) does, and should, select entries ;; that have any deadline. But the common case of wanting to select entries whose deadline is