`org-project-capture` integrates `org-mode` TODOs with both `projectile` and `project.el`. This permits the maintenance of TODO lists for specific projects.
- Install using the package instructions for your Emacs setup. If you’re using MELPA:
M-x package-install org-project-capture
- For those intending to use the `projectile` backend, also install `org-projectile`:
M-x package-install org-projectile
You need to set the backend for `org-project-capture` using its class-based structure.
- For `project.el`:
(setq org-project-capture-default-backend (make-instance 'org-project-capture-project-backend))
- If using `projectile` via `org-projectile`:
(setq org-project-capture-default-backend (make-instance 'org-project-capture-projectile-backend))
Specify the location for storing project-specific TODOs:
(setq org-project-capture-projects-file "~/org/projects.org")
Establish a keybinding for easy capturing:
(global-set-key (kbd "C-c n p") 'org-project-capture-project-todo-completing-read)
Determine if TODOs should be in a single file or across individual projects:
(org-project-capture-single-file)
;; OR
(org-project-capture-per-project)
Combine both strategies, but prefer single file (projects will only use their own file if they already have one)
(setq org-project-capture-strategy
(make-instance 'org-project-capture-combine-strategies
:strategies (list (make-instance 'org-project-capture-single-file-strategy)
(make-instance 'org-project-capture-per-project-strategy))))
For those utilizing `use-package`, here’s a streamlined setup:
(use-package org-project-capture
:bind (("C-c n p" . org-project-capture-project-todo-completing-read))
:ensure t
:config
(progn
(setq org-project-capture-backend
(make-instance 'YOUR-CHOSEN-BACKEND)) ; Replace with your backend of choice
(setq org-project-capture-projects-file "~/org/projects.org")
(org-project-capture-single-file))
There are numerous customization options for `org-project-capture`:
M-x customize-group RET org-project-capture RET