在组织模式下,如何仅查看当前缓冲区的待办事项?


12

在org-mode下,我喜欢运行org-todo-list,它显示了包括所有我的org-agenda文件的全局任务列表。如何忽略当前其他组织议程文件,仅查看当前缓冲区的TODO列表?

Answers:


13

您可以使用<议程菜单中的命令将当前议程调用限制为从中调用议程的缓冲区。要限制该文件进行多次通话,可以使用C-c C-x <org-agenda-set-restriction-lock)。请参阅(info "(org) Agenda files")以获取更多信息。


10

您可以org-show-todo-tree用来获取当前缓冲区的TODO项的稀疏树视图。C-c / t默认情况下绑定。


7

您可以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))))
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.