Search code examples
emacsorg-modetodo

Storing org-mode TODOs inside source code


I like keeping TODOs inside my source code next to lines that need updating. Can I include these in Org-mode's agenda?


Solution

  • You would need to add those files to your org-agenda-files. But this is going to clutter your agenda with all the stuff inside your source files and there is nothing like an org-prog-mode I know of.

    It might be easier to invert the process by defining an appropriate org-capture. You can just use the place from which you triggered the capture process and put it as a link in the entry you create. You can then navigate to the place by using C-o when the point is on top of the right entry. You probably also want to use org-refile to get the TODO to the proper subtree for your project.

    Actually the default capture template is pretty close to what works for me:

    ("t" "Task" entry (file+headline "/path/to/org/notes.org" "Tasks") "* TODO %?
      %u
      %a" :prepend t)