diff --git a/README.org b/README.org index 272c7b9..f1f5087 100644 --- a/README.org +++ b/README.org @@ -191,7 +191,7 @@ These selectors take one argument alone, or multiple arguments in a list. + =:category= :: Group items that match any of the given categories. Argument may be a string or list of strings. + =:children= :: Select any item that has child entries. Argument may be ~t~ to match if it has any children, ~nil~ to match if it has no children, ~todo~ to match if it has children with any to-do keywords, or a string to match if it has children with certain to-do keywords. You might use this to select items that are project top-level headings. Be aware that this may be very slow in non-daily/weekly agenda views because of its recursive nature. + =:date= :: Group items that have a date associated. Argument can be =t= to match items with any date, =nil= to match items without a date, or =today= to match items with today’s date. The =ts-date= text-property is matched against. -+ =:deadline= :: Group items that have a deadline. Argument can be ~t~ (to match items with any deadline), ~nil~ (to match items that have no deadline), ~past~ (to match items with a deadline in the past), ~today~ (to match items whose deadline is today), or ~future~ (to match items with a deadline in the future). Argument may also be given like ~before DATE~ or ~after DATE~ where DATE is a date string that ~org-time-string-to-absolute~ can process. ++ =:deadline= :: Group items that have a deadline. Argument can be ~t~ (to match items with any deadline), ~nil~ (to match items that have no deadline), ~past~ (to match items with a deadline in the past), ~today~ (to match items whose deadline is today), or ~future~ (to match items with a deadline in the future). Argument may also be given like ~before DATE~ or ~after DATE~ where DATE is a date string that ~org-read-date~ can process. + =:effort<= :: Group items that are less than (or equal to) the given effort. Argument is a time-duration string, like ~5~ or ~0:05~ for 5 minutes. + =:effort>= :: Group items that are higher than (or equal to) the given effort. Argument is a time-duration string, like ~5~ or ~0:05~ for 5 minutes. + ~:file-path~ :: Group items whose buffers' filename paths match any of the given regular expressions. @@ -205,7 +205,7 @@ These selectors take one argument alone, or multiple arguments in a list. + =:priority<= :: Group items that are lower than the given priority, e.g. ~A~. + =:priority<== :: Group items that are lower than or equal to the given priority, e.g. ~B~. + =:regexp= :: Group items that match any of the given regular expressions. -+ =:scheduled= :: Group items that are scheduled. Argument can be ~t~ (to match items scheduled for any date), ~nil~ (to match items that are not schedule), ~past~ (to match items scheduled for the past), ~today~ (to match items scheduled for today), or ~future~ (to match items scheduled for the future). Argument may also be given like ~before DATE~ or ~after DATE~ where DATE is a date string that ~org-time-string-to-absolute~ can process. ++ =:scheduled= :: Group items that are scheduled. Argument can be ~t~ (to match items scheduled for any date), ~nil~ (to match items that are not schedule), ~past~ (to match items scheduled for the past), ~today~ (to match items scheduled for today), or ~future~ (to match items scheduled for the future). Argument may also be given like ~before DATE~ or ~after DATE~ where DATE is a date string that ~org-read-date~ can process. + =:tag= :: Group items that match any of the given tags. Argument may be a string or list of strings. + =:time-grid= :: Group items that appear on the time grid. + =:todo= :: Group items that match any of the given TODO keywords. Argument may be a string or list of strings, or ~t~ to match any keyword, or ~nil~ to match only non-todo items. diff --git a/examples.org b/examples.org index d05986b..63da616 100644 --- a/examples.org +++ b/examples.org @@ -237,6 +237,15 @@ Let's say it's approaching the start of a new school year, and you want to see a Of course, you could also write that as a standard agenda command with the [[http://orgmode.org/worg/org-tutorials/advanced-searching.html][advanced searching syntax]], and it would execute faster. +Perhaps you want to see all tasks due within the next two weeks? You can use relative date notation like this: + +#+BEGIN_SRC elisp :results none + (let ((org-super-agenda-groups + '((:deadline (before "+2w")) + (:discard (:anything t))))) + (org-todo-list)) +#+END_SRC + What if you wanted to group tasks that are due before the end of the current month? You could use something like this: #+BEGIN_SRC elisp diff --git a/org-super-agenda.el b/org-super-agenda.el index 7e4cecf..0c9e03a 100644 --- a/org-super-agenda.el +++ b/org-super-agenda.el @@ -434,8 +434,7 @@ match items that have no deadline), `past` (to match items with a deadline in the past), `today' (to match items whose deadline is today), or `future' (to match items with a deadline in the future). Argument may also be given like `before DATE' or `after -DATE', where DATE is a date string that -`org-time-string-to-absolute' can process." +DATE', where DATE is a date string that `org-read-date' can process." :section-name (pcase (car args) ('t "Deadline items") ('nil "Items without deadlines") @@ -450,7 +449,7 @@ DATE', where DATE is a date string that (org-today)))) (target-date (pcase (car args) ((or 'before 'on 'after) - (org-time-string-to-absolute (cadr args)))))) + (org-time-string-to-absolute (org-read-date nil nil (cadr args))))))) :test (org-super-agenda--when-with-marker-buffer (org-super-agenda--get-marker item) (let ((entry-time (org-entry-get (point) "DEADLINE"))) (pcase (car args) @@ -471,8 +470,7 @@ Argument can be `t' (to match items scheduled for any date), items scheduled for the past), `today' (to match items scheduled for today), or `future' (to match items scheduled for the future). Argument may also be given like `before DATE' or `after -DATE', where DATE is a date string that -`org-time-string-to-absolute' can process." +DATE', where DATE is a date string that `org-read-date' can process." :section-name (pcase (car args) ('t "Scheduled items") ('nil "Unscheduled items ") @@ -487,7 +485,7 @@ DATE', where DATE is a date string that (org-today)))) (target-date (pcase (car args) ((or 'before 'on 'after) - (org-time-string-to-absolute (cadr args)))))) + (org-time-string-to-absolute (org-read-date nil nil (cadr args))))))) :test (org-super-agenda--when-with-marker-buffer (org-super-agenda--get-marker item) (let ((entry-time (org-entry-get (point) "SCHEDULED"))) (pcase (car args)