From 525b4fcb547349e9deb7279ac52f1684e1e88f4b Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Sat, 13 Jul 2024 22:39:13 +0300 Subject: [PATCH] emacs: experiments with sequential headers in org-mode --- .emacs.d/init.el | 115 ++++++++++++++++++++++++++++++++++++++++- Emacs.org | 130 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 240 insertions(+), 5 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index c7de949..f2872c8 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -3787,7 +3787,21 @@ With ARG, repeats or can move backward if negative." :commands (org-clock-agg) :init (with-eval-after-load 'org - (my-leader-def "ol" #'org-clock-agg))) + (my-leader-def "ol" #'org-clock-agg)) + :config + (push + (cons "Agenda+Archive" + (append + (org-agenda-files) + (thread-last "/projects/archive" + (concat org-directory) + (directory-files) + (mapcar (lambda (f) + (concat + org-directory "/projects/archive/" f))) + (seq-filter (lambda (f) + (not (file-directory-p f))))))) + org-clock-agg-files-preset)) (with-eval-after-load 'org (setq org-clock-persist 'clock) @@ -4006,7 +4020,15 @@ TYPE may be `ts', `ts-active', `ts-inactive', `clocked', or (not (property "MEETING")) (ts :from -7)) :super-groups '((:auto-outline-path-file t)))) - (cons "Review: Meeting" #'my/org-ql-meeting-tasks))) + (cons "Review: Meeting" #'my/org-ql-meeting-tasks) + (cons "Fix: tasks without TASK_KIND" + (lambda () + (interactive) + (org-ql-search (current-buffer) + '(and (olp "Tasks") + (not (property "TASK_KIND")) + (clocked)) + :super-groups '((:auto-outline-path-file t))))))) (defun my/org-ql-view--format-element-override (element) "Format ELEMENT for `org-ql-view'. @@ -4323,6 +4345,95 @@ KEYS is a list of cons cells like (