Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: alphapapa/org-super-agenda
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f184c49d0b2017ace42c18dad1eafe0aaa624d91
Choose a base ref
..
head repository: alphapapa/org-super-agenda
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: df7b07eff5031b4083543fbdcbf495b2ceeb7e72
Choose a head ref
Showing with 22 additions and 24 deletions.
  1. +2 −1 README.org
  2. +16 −18 org-super-agenda.el
  3. +4 −5 org-super-agenda.info
3 changes: 2 additions & 1 deletion README.org
Original file line number Diff line number Diff line change
@@ -194,6 +194,7 @@ These selectors take one argument alone, or multiple arguments in a list.
+ =: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.
+ =: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.
+ =:done= :: Group items that are done according to ~org-done-keywords~.
+ =: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.
+ =:habit= :: Group habit items (items which have a =STYLE: habit= Org property).
@@ -210,7 +211,7 @@ These selectors take one argument alone, or multiple arguments in a list.
+ =: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.
+ =: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. You can also use ~done~ (or ~not-done~) to match keywords that are (not) "done" according to the local value of ~org-done-keywords~ (or ~org-not-done-keywords~).
+ =: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.

** Tips

34 changes: 16 additions & 18 deletions org-super-agenda.el
Original file line number Diff line number Diff line change
@@ -766,26 +766,24 @@ keyword, or `nil' to match only non-todo items."
"Any TODO keyword")
('nil ;; Test for not having a to-do keyword
"Non-todo items")
('done ;; Test for keyword matching done keywords
"Done items")
('not-done ;; Test keyword matching not-done keywords
"Not-done items")
(_ ;; Oops
(user-error "Argument to `:todo' must be a string, list of strings, t, done, not-done or nil")))
(user-error "Argument to `:todo' must be a string, list of strings, t, or nil")))
:test (pcase (car args)
((pred stringp) ;; To-do keyword given
(cl-member (org-find-text-property-in-string 'todo-state item) args :test 'string=))
('t ;; Test for any to-do keyword
(org-find-text-property-in-string 'todo-state item))
('nil ;; Test for not having a to-do keyword
(not (org-find-text-property-in-string 'todo-state item)))
(_ ;; Oops
(user-error "Argument to `:todo' must be a string, list of strings, t, or nil"))))

(org-super-agenda--defgroup done
"Group items that are done according to `org-done-keywords'."
:section-name "Done items"
:test (org-super-agenda--when-with-marker-buffer (org-super-agenda--get-marker item)
(pcase (car args)
((pred stringp) ;; To-do keyword given
(cl-member (org-find-text-property-in-string 'todo-state item) args :test 'string=))
('t ;; Test for any to-do keyword
(org-find-text-property-in-string 'todo-state item))
('done ;; Test for done keyword
(cl-member (org-find-text-property-in-string 'todo-state item) org-done-keywords :test 'string=))
('not-done ;; Test for not-done keyword
(cl-member (org-find-text-property-in-string 'todo-state item) org-not-done-keywords :test 'string=))
('nil ;; Test for not having a to-do keyword
(not (org-find-text-property-in-string 'todo-state item)))
(_ ;; Oops
(user-error "Argument to `:todo' must be a string, list of strings, t, done, not-done or nil")))))
(when-let ((state (org-get-todo-state)))
(member state org-done-keywords))))

(org-super-agenda--defgroup ancestor-with-todo
"their earliest ancestor having the to-do keyword"
9 changes: 4 additions & 5 deletions org-super-agenda.info
Original file line number Diff line number Diff line change
@@ -422,6 +422,8 @@ list.
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.
‘:done’
Group items that are done according to ‘org-done-keywords’.
‘: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
@@ -482,11 +484,8 @@ list.
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. You can also use ‘done’ (or
‘not-done’) to match keywords that are (not) "done" according to
the local value of ‘org-done-keywords’ (or
‘org-not-done-keywords’).
may be a string or list of strings, or ‘t’ to match any keyword, or
‘nil’ to match only non-todo items.


File: README.info, Node: Tips, Prev: Group selectors, Up: Usage