Answers:
您可以使用<
议程菜单中的命令将当前议程调用限制为从中调用议程的缓冲区。要限制该文件进行多次通话,可以使用C-c C-x <
(org-agenda-set-restriction-lock
)。请参阅(info "(org) Agenda files")
以获取更多信息。
您可以org-agenda-files
动态绑定到当前缓冲区的文件并org-todo-list
从那里调用:
(defun org-todo-list-current-file (&optional arg)
"Like `org-todo-list', but using only the current buffer's file."
(interactive "P")
(let ((org-agenda-files (list (buffer-file-name (current-buffer)))))
(if (null (car org-agenda-files))
(error "%s is not visiting a file" (buffer-name (current-buffer)))
(org-todo-list arg))))