From 99f9eb6af41de70fe83a0e2d7d3644d137e2a941 Mon Sep 17 00:00:00 2001 From: Feng Shu Date: Fri, 5 Jul 2024 17:03:09 +0800 Subject: [PATCH] eh-org.el: org-super-agenda add :auto-eh-parent. --- eh-org.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/eh-org.el b/eh-org.el index 65f8ea5..38ffe48 100644 --- a/eh-org.el +++ b/eh-org.el @@ -492,6 +492,15 @@ ;; Org super agenda (require 'org-super-agenda) + +(org-super-agenda--def-auto-group eh-parent "their parent heading" + :key-form (org-super-agenda--when-with-marker-buffer (org-super-agenda--get-marker item) + (when (org-up-heading-safe) + (concat (org-entry-get nil "ITEM") + (if (string-suffix-p ".org_archive" (buffer-name)) + "(归档)" + ""))))) + (setq org-super-agenda-unmatched-name "未分组") (setq org-super-agenda-groups '((:name "Today" :time-grid t) @@ -503,7 +512,7 @@ (org-super-agenda--when-with-marker-buffer (org-super-agenda--get-marker item) (equal (org-current-level) 1)))) - (:auto-parent t))) + (:auto-eh-parent t))) (org-super-agenda-mode 1) -- 2.11.4.GIT