summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/evil.el8
-rw-r--r--config/org.el32
2 files changed, 27 insertions, 13 deletions
diff --git a/config/evil.el b/config/evil.el
index 0e40002..e3297f3 100644
--- a/config/evil.el
+++ b/config/evil.el
@@ -31,3 +31,11 @@
:files (:defaults "modes"))
:config
(evil-collection-init)) ;; Provides Evil bindings for many Emacs modes
+
+(use-package evil-org
+ :after (evil org)
+ :hook (org-mode . evil-org-mode)
+ :config
+ (evil-org-set-key-theme '(navigation insert textobjects additional calendar))
+ (require 'evil-org-agenda)
+ (evil-org-agenda-set-keys))
diff --git a/config/org.el b/config/org.el
index 88be8e8..cdb3156 100644
--- a/config/org.el
+++ b/config/org.el
@@ -18,7 +18,7 @@
;; TODO workflow states
(setq org-todo-keywords
- '((sequence "TODO" "DOING" "|" "DONE")))
+ '((sequence "TODO" "|" "DONE")))
;; Log timestamp when task is marked DONE
(setq org-log-done 'time)
@@ -28,20 +28,25 @@
;; =====================================
(defun org-update-deadline-properties ()
- "Update DAYS and URGENCY properties for all TODO entries with deadlines."
+ "Update DAYS and URGENCY properties for all entries with deadlines."
(interactive)
(org-map-entries
(lambda ()
- (let ((deadline (org-get-deadline-time (point))))
+ (let ((deadline (org-get-deadline-time (point)))
+ (done (org-entry-is-done-p)))
(when deadline
- (let* ((days (- (time-to-days deadline) (time-to-days (current-time))))
- (urgency (cond
- ((< days 0) "OVERDUE")
- ((<= days 7) "CLOSE")
- (t "OK"))))
- (org-set-property "DAYS" (number-to-string days))
- (org-set-property "URGENCY" urgency)))))
- "/!TODO|DOING" 'file))
+ (if done
+ (progn
+ (org-set-property "DAYS" "0")
+ (org-set-property "URGENCY" "DONE"))
+ (let* ((days (- (time-to-days deadline) (time-to-days (current-time))))
+ (urgency (cond
+ ((< days 0) "OVERDUE")
+ ((<= days 7) "CLOSE")
+ (t "OK"))))
+ (org-set-property "DAYS" (number-to-string days))
+ (org-set-property "URGENCY" urgency))))))
+ "/TODO|DONE" 'file))
;; Auto-update when opening org files
(add-hook 'org-mode-hook
@@ -79,8 +84,9 @@
;; =====================================
(use-package calfw
- :commands cfw:open-calendar-buffer)
+ :demand t)
(use-package calfw-org
+ :demand t
:after calfw
- :commands cfw:open-org-calendar)
+)