From 291f91dbb8df2f6f4ddbc09b20eedc47a463282f Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 13 Sep 2023 15:31:06 -0600 Subject: [PATCH] [Emacs] Add completer field to TODOs --- dotfiles/emacs.d/.mc-lists.el | 2 ++ dotfiles/emacs.d/org-config.org | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dotfiles/emacs.d/.mc-lists.el b/dotfiles/emacs.d/.mc-lists.el index 5f7edee5..66a222a0 100644 --- a/dotfiles/emacs.d/.mc-lists.el +++ b/dotfiles/emacs.d/.mc-lists.el @@ -22,6 +22,7 @@ helm-show-kill-ring imalison:avy imalison:multi-line + increase-left-margin indent-for-tab-command indent-region insert-register @@ -49,6 +50,7 @@ skeleton-pair-insert-maybe sp-backward-sexp sp-forward-sexp + sp-forward-slurp-sexp sp-remove-active-pair-overlay sp-splice-sexp sp-splice-sexp-killing-backward diff --git a/dotfiles/emacs.d/org-config.org b/dotfiles/emacs.d/org-config.org index c8e4a475..a1b60583 100644 --- a/dotfiles/emacs.d/org-config.org +++ b/dotfiles/emacs.d/org-config.org @@ -222,7 +222,7 @@ We're going to use this to write separate parts of our config to different secti #+begin_src emacs-lisp :tangle org-config-config.el (add-to-list 'org-modules 'org-habit) #+end_src -** Assignee +** Assignee/Completer #+begin_src emacs-lisp :tangle org-config-config.el (defmacro imalison:def-agenda-pred (&rest forms) `(lambda () @@ -282,6 +282,15 @@ We're going to use this to write separate parts of our config to different secti (imalison:def-agenda-pred (imalison:assigned-to-me))) #+end_src +*** Add a hook to automatically set completer +#+begin_src emacs-lisp :tangle org-config-config.el +(defun imalison:maybe-add-completer (state-change) + (when + (and (eq (plist-get state-change :type) 'todo-state-change) + (null (org-entry-get nil "COMPLETER"))) + (org-set-property "COMPLETER" imalison:org-whoami))) +(add-hook 'org-trigger-hook 'imalison:maybe-add-completer) +#+end_src ** Agenda #+begin_src emacs-lisp :tangle org-config-config.el (require 'org-agenda) @@ -944,6 +953,8 @@ alphanumeric characters only." :repo "colonelpanic8/org-window-habit" :host github :files ("org-window-habit.el")) + :custom + ((org-window-habit-property-prefix nil)) :config (progn (org-window-habit-mode +1)))