legacy-dotfiles/.emacs.d/site-lisp/org-init.el

128 lines
4.8 KiB
EmacsLisp

;;; org-init.el --- Org initialization
;; Copyright (C) 2012 Tom Willemsen
;; Author: Tom Willemsen <slash@drd>
;; Keywords:
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;;; Code:
(require 'appt)
(require 'oni)
(require 'org-contacts)
(require 'org-habit)
(require 'org-protocol)
(eval-after-load "org-crypt"
'(org-crypt-use-before-save-magic))
(setq org-agenda-custom-commands
'(("pa" "Avandu" tags-todo "slug=\"avandu\"")
("pb" "Blog" tags-todo "slug=\"blog\"")
("pc" "Configuration" tags-todo "slug=\"configuration\"")
("pd" "dispass.el" tags-todo "slug=\"dispass.el\"")
("pD" "DVDroid" tags-todo "slug=\"dvdroid\"")
("pe" "Eye on Manga" tags-todo "slug=\"eye-on-manga\"")
("pG" "gDisPass" tags-todo "slug=\"gdispass\"")
("pg" "gitto" tags-todo "slug=\"gitto\"")
("pi" "Ideas" tags-todo "slug=\"ideas\"")
("pM" "Maintenance" tags-todo "slug=\"maintenance\"")
("pme" "Metal Express Radio.el" tags-todo
"slug=\"metal-express-radio.el\"")
("pmo" "Mode Icons" tags-todo "slug=\"mode-icons\"")
("pmy1" "myAethon" tags-todo "slug=\"myaethon\"")
("pmy2" "myAethon2" tags-todo "slug=\"myaethon2\"")
("ps" "Sawfish Naquadah theme" tags-todo
"slug=\"sawfish-naquadah-theme\"")
("w" "Work todo." tags-todo "work")))
(setq org-agenda-sorting-strategy
'((agenda habit-down time-up priority-down category-keep)
(todo priority-down category-keep)
(tags priority-down category-keep)
(search category-keep)))
(setq org-agenda-tags-column -101)
(setq org-capture-templates
'(("t" "Task" entry (file "~/documents/org/tasks")
"* TODO %?")
("h" "Habit" entry (file "")
(concat "* TODO %^{Description}\n"
" SCHEDULED: %^T\n"
" :PROPERTIES:\n"
" :STYLE: habit\n"
" :END:")
:immediate-finish t)
("l" "Log" entry (file+headline "" "notes")
(concat "* %n %<%d-%m-%Y %H:%M:%S>\n"
" %a\n\n"
" %?")
:prepend t :empty-lines 1)
("a" "Appointment" entry (file+headline "" "appointments")
"* %^{Description} %^T" :immediate-finish t)
("b" "Bookmark" entry (file "~/documents/org/misc/bookmarks.org")
"* %c\n\n %:initial")))
(setq org-contacts-files '("~/documents/org/misc/contacts.org"))
(setq org-directory (expand-file-name "~/documents/org"))
(setq org-agenda-files
(append
`(,(concat org-directory "/tasks")
,(concat org-directory "/misc/contacts.org")
,(concat org-directory "/misc/bookmarks.org"))
org-agenda-files))
(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"
"http://www.myepisodes.com/rss.php?feed=mylist&uid=Slash&pwdmd5=04028968e1f0b7ee678b748a4320ac17"
"~/documents/org/tasks" "MyEpisodes"
:formatter oni:myepisodes-formatter)))
(setq org-hide-emphasis-markers t)
(setq org-outline-path-complete-in-steps t)
(setq org-refile-allow-creating-parent-nodes t)
(setq org-refile-targets '((nil . (:maxlevel . 6))))
(setq org-refile-use-outline-path 'file)
(setq org-return-follows-link t)
(setq org-src-fontify-natively t)
(setq org-tags-column -101)
(setq org-tags-exclude-from-inheritance '("crypt"))
(setq org-todo-keyword-faces
'(("TODO" :background "red")
("DONE" :background "forest green")
("SUCCEEDED" :background "forest green")
("WAITING" :background "orange" :foreground "black")
("CANCELLED" :background "orange red")
("FAILED" :background "orange red")
("WIP" :background "#ff9800" :foreground "black")
("HOLD" :background "orange" :foreground "black")
("ACQUIRE" :background "red")
("IGNORED" :background "#555555")))
(setq org-use-fast-todo-selection t)
(setq org-use-property-inheritance '("slug"))
(add-to-list 'org-modules 'habit)
(org-indent-mode t)
(org-agenda-to-appt)
(ad-activate 'org-agenda-redo)
(provide 'org-init)
;;; org-init.el ends here