(defun my/skip-parent-todo-entries ()
"Skip TODOs that are not the last level."
(if (save-excursion (org-goto-first-child))
(or (outline-next-heading) (point-max))
(if (org-entry-is-todo-p)
nil
(org-end-of-subtree t))))
(setq org-agenda-custom-commands '(("t" "Show last level TODOs"
((todo ""
((org-agenda-skip-function #'my/skip-parent-todo-entries)))))))
你可以试试,应该没什么问题。
这里用了 org-agenda-custom-commands
相关用法可以看 Custom Agenda Views (The Org Manual)