Fix: (org-ql-agenda) Restore super-groups functionality
Fixes #17. Thanks to Dustin Lacewell (@dustinlacewell).
This commit is contained in:
parent
50fab59fec
commit
efb6938748
1 changed files with 8 additions and 5 deletions
|
|
@ -65,11 +65,12 @@ When nil, buffers are widened before being searched.
|
||||||
BUFFER, when non-nil, is a buffer or buffer name to display the
|
BUFFER, when non-nil, is a buffer or buffer name to display the
|
||||||
agenda in, rather than the default."
|
agenda in, rather than the default."
|
||||||
(declare (indent defun)
|
(declare (indent defun)
|
||||||
(advertised-calling-convention (files-or-query &optional query &key sort narrow buffer) nil))
|
(advertised-calling-convention (files-or-query &optional query &key sort narrow buffer super-groups) nil))
|
||||||
(cl-macrolet ((set-keyword-args (args)
|
(cl-macrolet ((set-keyword-args (args)
|
||||||
`(setq sort (plist-get ,args :sort)
|
`(setq sort (plist-get ,args :sort)
|
||||||
narrow (plist-get ,args :narrow)
|
narrow (plist-get ,args :narrow)
|
||||||
buffer (plist-get ,args :buffer))))
|
buffer (plist-get ,args :buffer)
|
||||||
|
super-groups (plist-get ,args :super-groups))))
|
||||||
(let ((files '(org-agenda-files))
|
(let ((files '(org-agenda-files))
|
||||||
query sort narrow buffer)
|
query sort narrow buffer)
|
||||||
;; Parse args manually (so we can leave FILES nil for a default argument).
|
;; Parse args manually (so we can leave FILES nil for a default argument).
|
||||||
|
|
@ -98,18 +99,20 @@ agenda in, rather than the default."
|
||||||
',query
|
',query
|
||||||
:sort ',sort
|
:sort ',sort
|
||||||
:buffer ,buffer
|
:buffer ,buffer
|
||||||
:narrow ,narrow))))
|
:narrow ,narrow
|
||||||
|
:super-groups ,super-groups))))
|
||||||
|
|
||||||
;;;; Functions
|
;;;; Functions
|
||||||
|
|
||||||
;; TODO: Move the action-fn down into --filter-buffer, so users can avoid calling the
|
;; TODO: Move the action-fn down into --filter-buffer, so users can avoid calling the
|
||||||
;; headline-parser when they don't need it.
|
;; headline-parser when they don't need it.
|
||||||
|
|
||||||
(cl-defun org-ql-agenda--agenda (buffers-files query &key sort buffer narrow)
|
(cl-defun org-ql-agenda--agenda (buffers-files query &key sort buffer narrow super-groups)
|
||||||
"FIXME: Docstring"
|
"FIXME: Docstring"
|
||||||
(declare (indent defun))
|
(declare (indent defun))
|
||||||
;; I think it's reasonable to use `eval' here.
|
;; I think it's reasonable to use `eval' here.
|
||||||
(let* ((entries (--> (eval `(org-ql ',buffers-files
|
(let* ((org-super-agenda-groups super-groups)
|
||||||
|
(entries (--> (eval `(org-ql ',buffers-files
|
||||||
,query
|
,query
|
||||||
:sort ,sort
|
:sort ,sort
|
||||||
:markers t
|
:markers t
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue