Org-agendaのアジェンダビューを構成するためにはorg-agenda-filesを指定し なければならないがカレントバッファのOrg形式のドキュメントの編集を行っ ている時そのドキュメントのアジェンダビューを一時的に表示しタスクの確認 などを行いたくなる。そういう場合にはどうすれば良いのかとさがしていたが やはり同じことを考えている人がいた。
http://blog.livedoor.jp/tek_nishi/archives/10236366.html
要はorg-agenda-filesをletで上書きしorg-todo-listを呼び出せば良い。
(defun org-todo-list-from-curent-buffer (&optional arg)
"Generate an agenda view from the selected buffer."
(interactive "P")
(if-let ((org-agenda-files (or (buffer-file-name (current-buffer))
org-agenda-files)))
(org-todo-list arg)
(error "%s is not visiting a file" (buffer-name buf))))
修正
https://github.com/TakesxiSximada/emacs.d/pull/25