Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a TODO item under the current org-brain entry
Add a key-binding to directly add a TODO entry to the current entry in org-brain. This makes it possible to capture action items about the current entry without leaving the org-brain-visualization window. I use org-capture to implement this functionality and have made changes that I don't have too much experience with. I'd love feedback / different ways to do this. Summary of changes: 1. Set up capture templates for brain. I'm using "b" as a template prefix key for capture templates related to org-brain. Since people may already be using this key in their own capture templates, this functionality is turned off by default (via `org-brain-visualize-use-capture-templates` var) and the user can select a different prefix key (via `org-brain-visualize-capture-prefix-key` var) Since I was setting up capture templates, I also moved the capture template described in the README to this code. Finally, these templates only work in the context of org-brain-visualize, to avoid clutter in other modes. 2. Add `org-brain-visualize-add-todo` and `org-brain-add-todo` Once the user configures the variables above, they can use the 'y' key-binding in org-brain to create a TODO for the current brain entry. 3. `org-brain-visualize--register-capture-templates` This is a helper function to ensure that we set up the capture templates only once (after org-capture is loaded). I'm not sure what the idiomatic way to do this is, feedback welcome. This is the first cut of this functionality. If you think this is okay, I'll make changes in the README file (and any other changes you require). I am also not sure if I've created the vars and functions in the correct place in the org-brain.el. I'll move them to the correct places based on your feedback.
- Loading branch information