Skip to content

colonelpanic8/org-project-capture

Repository files navigation

https://github.com/colonelpanic8/org-project-capture/actions/workflows/build.yml/badge.svg https://badges.gitter.im/Join%20Chat.svg http://melpa.org/packages/org-project-capture-badge.svg http://stable.melpa.org/packages/org-project-capture-badge.svg

org-project-capture

`org-project-capture` integrates `org-mode` TODOs with both `projectile` and `project.el`. This permits the maintenance of TODO lists for specific projects.

Installation

  • 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
        

Setup

Backend Selection

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))
        

File Configuration

Specify the location for storing project-specific TODOs:

(setq org-project-capture-projects-file "~/org/projects.org")

Keybindings

Establish a keybinding for easy capturing:

(global-set-key (kbd "C-c n p") 'org-project-capture-project-todo-completing-read)

Capture Strategy

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))))

`use-package` Configuration

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))

Customization

There are numerous customization options for `org-project-capture`:

M-x customize-group RET org-project-capture RET