This commit is contained in:
Adam Porter 2019-09-07 17:43:25 -05:00
parent 0ff109ed10
commit d0705dce0b
2 changed files with 28 additions and 11 deletions

View file

@ -107,6 +107,29 @@
(ts-format "%d %B" it)))
))
(pop-to-buffer buffer)))
(let* ((buffer (get-buffer-create "test-org-ql-view-section"))
(items (->> (org-ql-select "~/src/emacs/org-ql/tests/data.org"
'(todo)
:action #'org-ql-item-at)
(-sort (-on #'string< #'org-ql-item-priority))
(org-ql-view-sort-planning)))
(top-section (org-ql-view-section
:header "To-Do by Planning Date"
:items items))
(inhibit-read-only t))
(with-current-buffer buffer
(read-only-mode 1)
(erase-buffer)
(org-ql-view-insert top-section
:group-by (list (lambda (item)
(awhen (or (org-ql-item-deadline-ts item) (org-ql-item-scheduled-ts item))
(ts-format "%B %Y" it)))
(lambda (item)
(awhen (or (org-ql-item-deadline-ts item) (org-ql-item-scheduled-ts item))
(ts-format "%d %B" it)))
'org-ql-item-todo
))
(pop-to-buffer buffer)))
(let* ((buffer (get-buffer-create "test-org-ql-view-section"))
(items (->> (org-ql-select "~/src/emacs/org-ql/tests/data.org"
'(todo)