From 1d2596c4e1fae0bd1bfe93664697b4933e7c7c26 Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Sun, 14 Oct 2018 15:20:46 -0500 Subject: emacs: add initial emacs configuration --- emacs/.emacs.d/org-mode.el | 60 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 emacs/.emacs.d/org-mode.el (limited to 'emacs/.emacs.d/org-mode.el') diff --git a/emacs/.emacs.d/org-mode.el b/emacs/.emacs.d/org-mode.el new file mode 100644 index 0000000..e80401c --- /dev/null +++ b/emacs/.emacs.d/org-mode.el @@ -0,0 +1,60 @@ +(require 'org-install) + +(load-user-file "org-mode.local.el") + +(add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) +(add-to-list 'auto-mode-alist `(,(expand-file-name "~/org/") . org-mode)) + +(define-key mode-specific-map [?a] 'org-agenda) + +(eval-after-load "org" + '(progn + (define-prefix-command 'org-todo-state-map) + + (define-key org-mode-map "\C-cx" 'org-todo-state-map) + + (define-key org-todo-state-map "x" #'(lambda nil (interactive) (org-todo "CANCELLED"))) + (define-key org-todo-state-map "d" #'(lambda nil (interactive) (org-todo "DONE"))) + (define-key org-todo-state-map "f" #'(lambda nil (interactive) (org-todo "DEFERRED"))) + (define-key org-todo-state-map "l" #'(lambda nil (interactive) (org-todo "DELEGATED"))) + (define-key org-todo-state-map "s" #'(lambda nil (interactive) (org-todo "STARTED"))) + (define-key org-todo-state-map "w" #'(lambda nil (interactive) (org-todo "WAITING"))))) + +(define-key global-map "\C-cc" 'org-capture) + +(custom-set-variables + '(org-agenda-custom-commands + (quote + (("d" todo "DELEGATED" nil) + ("c" todo "DONE|DEFERRED|CANCELLED" nil) + ("w" todo "WAITING" nil) + ("W" agenda "" ((org-agenda-ndays 21))) + ("A" agenda "" + ((org-agenda-skip-function + (lambda nil + (org-agenda-skip-entry-if + (quote notregexp) + "\\=.*\\[#!\\]"))) + (org-agenda-ndays 1) + (org-agenda-overriding-header "Today's Priority #A tasks: "))) + ("u" alltodo "" + ((org-agenda-skip-function + (lambda nil + (org-agenda-skip-entry-if + (quote scheduled) + (quote deadline) + (quote regexp) + " +]+>"))) + (org-agenda-overriding-header "Unscheduled TODO entries: ")))))) + '(org-agenda-dim-blocked-tasks t) + '(org-agenda-ndays 7) + '(org-agenda-show-all-dates t) + '(org-agenda-skip-deadline-if-done t) + '(org-agenda-skip-scheduled-if-done t) + '(org-agenda-start-on-weekday nil) + '(org-deadline-warning-days 7) + '(org-enforce-todo-dependencies t) + '(org-fast-tag-selection-single-key (quote expert)) + '(org-return-follows-link t) + '(org-reverse-note-order t)) -- cgit v1.2.3