Skip to content

Instantly share code, notes, and snippets.

@dustinlacewell-wk
Created January 9, 2018 22:43
Show Gist options
  • Save dustinlacewell-wk/a6ed63ccfa2cda816a27bc7de90d2bac to your computer and use it in GitHub Desktop.
Save dustinlacewell-wk/a6ed63ccfa2cda816a27bc7de90d2bac to your computer and use it in GitHub Desktop.
(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))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment