diff options
| -rw-r--r-- | lisp/documents.el | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lisp/documents.el b/lisp/documents.el index 4687ac3..e14aac7 100644 --- a/lisp/documents.el +++ b/lisp/documents.el @@ -90,7 +90,8 @@ :bind (:map org-mode-map ("C-c s" . org-goto) - ("C-c M-q" . auto-fill-mode)) + ("C-c M-q" . auto-fill-mode) + ("C-M-<return>" . log-todo-creation-date)) ;; Global keybindings for my Org workflow. :bind @@ -262,6 +263,16 @@ Visits LINK, or if LINK names a subdirectory of (org-agenda-skip-function ,subtree-is-habit) (org-agenda-overriding-header "Week Ahead:")))) ((org-agenda-compact-blocks t))))))) + ;; Finctionality to add a `CREATED' property -- I don't need something so + ;; intrusive that it inserts it for every heading. I can use my own + ;; discretion. + (defun log-todo-creation-date (&rest ignore) + "Log TODO creation time in the property drawer under the key 'CREATED'." + (interactive) + (when (and (org-get-todo-state) + (not (org-entry-get nil "CREATED"))) + (org-entry-put nil "CREATED" (format-time-string (cdr org-time-stamp-formats))))) + ;; Patch in an offset for tag alignment. (Without this, they will warp in a ;; way which I do not like.) :config/el-patch |