1

I often want to add TODO notes inside of my latex files I am currently working on or inside of other source code files scattered around in my filesystem.

The problem with this is that those TODO notes doesn't appear in my org agenda file obviously.

So is there any clever way to make TODO notes inside non org files (in my case mainly latex and python but I guess that shouldn't matter) and then collect them in my org agenda? In particular it would be great if the TODO notes could also contain timestamps as in regular org files.

Is there an alternative workflow I should consider for this?

3
  • 3
    A more conventional approach is to use org-capture with the annotation feature %a. This creates a link to the original file which you can go to from the agenda by pressing C-c C-o. Also, when you centralise your tasks in one or a few Org files you minimise the cost of parsing multiple files, especially if the files are long. – jagrg Jan 23 at 11:54
  • @jagrg: Thanks, but do I in your approach have also a TODO note inside the other file? That parsing multiple files my be an performance issue is indeed true. However I don't want to introduce any performance problems into my approach. – student Jan 23 at 12:18
  • You could, but no, it won't sync with the agenda if that's what you're trying to do. – jagrg Jan 23 at 23:22
3

Don't nest Org syntax inside your LaTeX files. Do it the other way around instead: nest LaTeX syntax in code blocks inside Org files, add each of those Org files to org-agenda-files, and tangle (export) the nested LaTeX code to pure-LaTeX files whenever you need to build. Don't worry if that means you're creating Org files that are 99% LaTeX; Org will handle it just fine.

https://orgmode.org/manual/Working-with-Source-Code.html

The same goes for Python and other languages supported by Org Babel.

2
  • What about the performance of org agenda, if you do this with hundreds of latex and python files. Then you also has to add all those files manually the org agenda files list? – student Jan 27 at 21:38
  • Right, that's definitely a potential downside to this approach. YMMV. Only you can judge whether it's a worthwhile trade-off for you. BTW, you only have to include the containing directory in org-agenda-files, not each individual file in the directory. (Remember that each variable in Emacs is documented -- C-h v org-agenda-files RET). I can only suggest you try my suggestion and see, and accept this answer if it works well enough for you. – Phil Hudson Jan 28 at 22:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.