Add: (org-ql-agenda--agenda) org-super-agenda-mode error

If groups are specified but the mode isn't active, the user will be
confused.  We might as well raise an error.
This commit is contained in:
Adam Porter 2018-12-15 01:03:28 -06:00
parent efb6938748
commit ed3741de4b

View file

@ -110,6 +110,8 @@ agenda in, rather than the default."
(cl-defun org-ql-agenda--agenda (buffers-files query &key sort buffer narrow super-groups)
"FIXME: Docstring"
(declare (indent defun))
(when (and super-groups (not org-super-agenda-mode))
(user-error "`org-super-agenda-mode' must be activated to use grouping"))
;; I think it's reasonable to use `eval' here.
(let* ((org-super-agenda-groups super-groups)
(entries (--> (eval `(org-ql ',buffers-files