(setq org-agenda-files '("~/org/capture.org" "~/org/main.org")) (setq org-agenda-include-diary t) (setq org-capture-templates '(("G" "Define a goal" entry (file+headline "~/org/capture.org" "Capture") (file "~/org/tpl/tpl_goal.txt") :empty-lines-after 2) ("N" "NEXT entry" entry (file+headline "~/org/capture.org" "Capture") (file "~/org/tpl/tpl_next.txt") :empty-lines-before 1) ("T" "TODO entry" entry (file+headline "~/org/capture.org" "Capture") (file "~/org/tpl/tpl_todo.txt") :empty-lines-before 1) ("W" "WAITING entry" entry (file+headline "~/org/capture.org" "Capture") (file "~/org/tpl/tpl_waiting.txt") :empty-lines-before 1) ("S" "SOMEDAY entry" entry (file+headline "~/org/capture.org" "Capture") (file "~/org/tpl/tpl_someday.txt") :empty-lines-before 1) ("P" "PROJ entry" entry (file+headline "~/org/capture.org" "Capture") (file "~/org/tpl/tpl_proj.txt") :empty-lines-before 1) ("B" "Book on the to-read-list" entry (file+headline "~/org/main.org" "Books to read") (file "~/org/tpl/tpl_book.txt") :empty-lines-after 2) ("D" "Add a daily plan checklist" entry (file+olp+datetree "~/org/daily_plan.org") (file "~/org/tpl/tpl_daily_plan.txt")) ("n" "Note" entry (file+headline "~/org/notes.org" "Random Notes") "** %?" :empty-lines 0) ("J" "Add a journal entry" entry (file+olp+datetree "~/org/journal.org") "* %<%H:%M> - %^{Activity}\12%?") ("w" "Add 10 I wants" entry (file+olp+datetree "~/org/wants.org") "* %<%H:%M>\0121. %?") ("b" "Add an item to buy" entry (file+headline "~/org/main.org" "Wish List") (file "~/org/tpl/tpl_wishlist.txt") :empty-lines-before 1))) (setq org-clock-into-drawer "CLOCKING") (setq org-enforce-todo-checkbox-dependencies t) (setq org-enforce-todo-dependencies t) (setq org-hide-emphasis-markers t) (setq org-hide-leading-stars t) (setq org-log-into-drawer t) (setq org-log-repeat nil) (setq org-log-reschedule 'note) (setq org-modules '(ol-bbdb ol-bibtex ol-docview ol-doi ol-eww ol-gnus org-habit ol-info ol-irc ol-mhe ol-rmail ol-w3m)) (setq org-refile-allow-creating-parent-nodes 'confirm) (setq org-refile-targets '((org-agenda-files :maxlevel . 2))) (setq org-startup-folded 'content) (setq org-startup-indented t) (defun my/copy-idlink-to-clipboard() "Copy an ID link with the headline to killring, if no ID is there then create a new unique ID. This function works only in org-mode or org-agenda buffers. The purpose of this function is to easily construct id:-links to org-mode items. If its assigned to a key it saves you marking the text and copying to the killring." (interactive) (when (eq major-mode 'org-agenda-mode) ;if we are in agenda mode we switch to orgmode (org-agenda-show) (org-agenda-goto)) (when (eq major-mode 'org-mode) ; do this only in org-mode buffers (setq mytmphead (nth 4 (org-heading-components))) (setq mytmpid (funcall 'org-id-get-create)) (setq mytmplink (format "[[id:%s][%s]]" mytmpid mytmphead)) (kill-new mytmplink) (message "Copied %s to killring (clipboard)" mytmplink) )) (global-set-key (kbd "") 'my/copy-idlink-to-clipboard) (defun org-reset-checkbox-state-maybe () "Reset all checkboxes in an entry if the `RESET_CHECK_BOXES' property is set" (interactive "*") (if (org-entry-get (point) "RESET_CHECK_BOXES") (org-reset-checkbox-state-subtree))) (defun org-checklist () (when (member org-state org-done-keywords) ;; org-state dynamically bound in org.el/org-todo (org-reset-checkbox-state-maybe))) (add-hook 'org-after-todo-state-change-hook 'org-checklist) (setq org-todo-keywords '((sequence "REPEAT(r)" "NEXT(n@/!)" "TODO(t@/!)" "WAITING(w@/!)" "SOMEDAY(s@/!)" "PROJ(p)" "|" "DONE(d@)" "CANCELLED(c@)") (sequence "GOAL(g)" "|" "ACHIEVED(a@)" "MISSED(m@)") )) ;; TODO colors (setq org-todo-keyword-faces '( ("TODO" . (:foreground "GoldenRod" :weight bold)) ("NEXT" . (:foreground "DeepPink" :weight bold)) ("WAITING" . (:foreground "dim gray" :weight bold)) ("REPEAT" . (:foreground "DarkOrange" :weight bold)) ("PROJ" . (:foreground "Red" :weight bold)) ("SOMEDAY" . (:foreground "chocolate" :weight bold)) ("DONE" . (:foreground "LimeGreen" :weight bold)) ("CANCELLED" . (:foreground "LimeGreen" :weight bold)) ("GOAL" . (:foreground "deep sky blue" :weight bold)) ("ACHIEVED" . (:foreground "green" :weight bold)) ("MISSED" . (:foreground "saddle brown" :weight bold)) )) ;;org Tags (setq org-tag-alist '(("BOOK" . ?b))) ;; Tag colors (setq org-tag-faces '( ("BOOK" . (:foreground "mediumPurple1" :weight bold)) ("NEW" . (:foreground "royalblue1" :weight bold)) ) ) (global-set-key (kbd "C-c a") 'org-agenda) (global-set-key (kbd "") 'org-capture)