From d5cc19efff84c5aa1316e124b1c2e0e64254ab55 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Fri, 23 Feb 2018 09:53:10 +0100 Subject: [PATCH] Emacs: org agenda --- emacs/emacs.el | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/emacs/emacs.el b/emacs/emacs.el index cf87b95..c96b1f7 100644 --- a/emacs/emacs.el +++ b/emacs/emacs.el @@ -382,6 +382,59 @@ ;; syntax highlighting (setq org-src-fontify-natively t) + + ;; set default agenda file + (setq org-agenda-files (quote ("/home/marcel/cloud/todo.org"))) + + ;; set priority range from A to C with A being the highest + (setq org-priority-faces '((?A . (:foreground "#F0DFAF" :weight bold)) + (?B . (:foreground "LightSteelBlue")) + (?C . (:foreground "OliveDrab")))) + + ;; open agenda in current window + (setq org-agenda-window-setup (quote current-window)) + + ;; bind capture templates + (define-key global-map (kbd "C-c c") 'org-capture) + (setq org-capture-templates + '(("t" "todo" entry (file+headline "/home/marcel/cloud/todo.org" "Tasks") + "* TODO [#A] %?") + ("s" "scheduled todo" entry (file+headline "/home/marcel/cloud/todo.org" "Tasks") + "* TODO [#A] %? \nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n") + ("m" "scheduled mail" entry (file+headline "/home/marcel/cloud/todo.org" "Tasks") + "* TODO [#A] %? \nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n%a\n"))) + + ;; warn of deadlines in the next seven days + (setq org-deadline-warning-days 7) + + ;; show tasks in the next 14 days + (setq org-agenda-span (quote fortnight)) + + ;; don't show tasks as scheduled if they are already shown as a deadline + (setq org-agenda-skip-scheduled-if-deadline-is-shown t) + + ;; don't give awarning colour to tasks with impending deadlines + ;; if they are scheduled to be done + (setq org-agenda-skip-deadline-prewarning-if-scheduled (quote pre-scheduled)) + + ;; don't show tasks that are scheduled or have deadlines in the normal todo list + (setq org-agenda-todo-ignore-deadlines (quote all)) + (setq org-agenda-todo-ignore-scheduled (quote all)) + + ;; sort tasks in order of when they are due and then by priority + (setq org-agenda-sorting-strategy + (quote + ((agenda deadline-up priority-down) + (todo priority-down category-keep) + (tags priority-down category-keep) + (search category-keep)))) + + ;; mu4e connection + (require 'org-mu4e) + + ;; store link to message if in header view, not to header query + (setq org-mu4e-link-query-in-headers-mode nil) + :bind (("C-c l" . org-store-link) ("C-c a" . org-agenda)))