Emacs extension org cuckoo - Liutos/cuckoo GitHub Wiki
Emacs Org-Cuckoo
A minor mode for interacting with cuckoo
inside Emacs.
Features
- Create
cuckoo
's notification fororg-mode
entries without leaving Emacs; - Cancel a task automatically when removing an entry's
SCHEDULED
property; - Synchronize
cuckoo
's tasks' state automatically.
Example
Installation
Download the cuckoo
repository. Assuming the local directory of cuckoo
repository is /path/to/cuckoo/
, add the following elisp code to your Emacs init-file.
(add-to-list 'load-path "/path/to/cuckoo/contrib/emacs/")
(require 'org-cuckoo)
(add-hook 'org-mode-hook
(lambda ()
(org-cuckoo-mode)))
(define-key org-mode-map "\C-clr" 'create-task-in-cuckoo)
(define-key org-mode-map "\C-c\C-s" 'cuckoo-org-schedule)
After setup, org-cuckoo
will add two functions into org-after-todo-state-change-hook
, which will be invoked when entry's keyword change to DONE
or CANCELLED
.
Shortcuts
Shortcut | Function |
---|---|
C-c l r |
Create a task and its remind for entry at point. |
C-c C-s |
Invoke org-schedule and synchronize task's properties. |
Configuration
To change the default behavior for constructing detail
field when create a task, assign the variable *org-cuckoo-default-task-detail-extractor*
a function. For example, I set this variable for entry about animation progress
(defun extract-task-detail ()
(let ((tags (org-get-tags-at)))
(cond ((or (member "动画" tags)
(member "阅读" tags))
(save-excursion
(org-show-context)
(outline-up-heading 1)
(format "《%s》" (nth 4 (org-heading-components)))))
(t ""))))
To change the default icon file when viewing tasks in following
Workflow result
(setq *org-cuckoo-default-icon-file* "/Applications/Emacs.app/Contents/Resources/Emacs.icns")