emacs: Add general note capture template

This note tries to collect as much context data as possible, even
though it isn't much at the moment.
This commit is contained in:
Tom Willemsen 2013-02-04 20:29:08 +01:00
parent 64a11cb9fc
commit 8987ba818a

View file

@ -30,9 +30,19 @@
(require 'org-habit)
(require 'org-protocol)
(autoload 'org-clocking-p "org-clock")
(eval-after-load "org-crypt"
'(org-crypt-use-before-save-magic))
(defun oni:note-template ()
(concat
"* %<%c>\n"
" :DIRECTORY: =" default-directory "=\n"
(when (buffer-file-name) " :FILE: [[file:%F][%F]]\n")
(when (org-clocking-p) " :TASK: %K\n")
"\n %?"))
(defun oni:org-maybe-outline-path ()
(let ((outline-path (org-format-outline-path (org-get-outline-path))))
(unless (string= outline-path "")
@ -58,7 +68,7 @@
to work.")
(defvar oni:work-agenda-files
(list (expand-file-name "~/documents/org/aethon.org"))
(list (expand-file-name "~/documents/org/aethon"))
"My work agenda, should only show up at times I work.")
(defvar oni:common-agenda-files
@ -94,17 +104,19 @@
(tags priority-down category-keep)
(search category-keep)))
(setq org-agenda-tags-column -101)
(setq org-directory (expand-file-name "~/documents/org"))
(setq org-default-notes-file (concat org-directory "/org"))
(setq org-capture-templates
'(("t" "Task" entry (file "~/documents/org/tasks")
`(("t" "Task" entry (file "~/documents/org/tasks")
"* TODO %?")
("T" "Linked task" entry (file "~/documents/org/tasks")
"* TODO %?\n\n %a")))
"* TODO %?\n\n %a")
("n" "General note" entry (file ,org-default-notes-file)
(function oni:note-template))))
(setq org-contacts-files '("~/documents/org/misc/contacts.org"))
(setq org-directory (expand-file-name "~/documents/org"))
(setq org-agenda-show-outline-path nil)
(setq org-agenda-todo-ignore-deadlines 'far)
(setq org-agenda-todo-ignore-scheduled t)
(setq org-default-notes-file (concat org-directory "/org"))
(setq org-export-htmlize-output-type 'css)
(setq org-feed-alist
'(("MyEpisodes"
@ -145,7 +157,7 @@
(ad-activate 'org-agenda-redo)
(oni:set-org-agenda-files)
(run-at-time "09:00" (* 60 60 24) 'oni:set-org-agenda-files)
(run-at-time "09:01" (* 60 60 24) 'oni:set-org-agenda-files)
(run-at-time "17:01" (* 60 60 24) 'oni:set-org-agenda-files)
(provide 'org-init)