Last active
September 4, 2019 20:46
-
-
Save lawlist/6b1a17fd9e1ebff274ea54c3310f4a1d to your computer and use it in GitHub Desktop.
Variation of org-todo with minibuffer prompt of choices.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-basic-org-todo () | |
"Doc-string ...." | |
(interactive) | |
(let* ((choice (read-char-exclusive "[t] TODO | [n] NEXT | [w] WAITING")) | |
(chosen-string (cond | |
((eq choice ?t) | |
"TODO") | |
((eq choice ?n) | |
"NEXT") | |
((eq choice ?w) | |
"WAITING") | |
(t | |
(user-error "Try again ..."))))) | |
(org-todo chosen-string))) | |
(defun my-fancy-org-todo () | |
"Doc-string ...." | |
(interactive) | |
(let* ((todo-string (propertize "TODO" 'face (org-get-todo-face "TODO"))) | |
(next-string (propertize "NEXT" 'face (org-get-todo-face "NEXT"))) | |
(waiting-string (propertize "WAITING" 'face (org-get-todo-face "WAITING"))) | |
(choice (read-char-exclusive (concat "[t] " | |
todo-string | |
" | [n] " | |
next-string | |
" | [w] " | |
waiting-string))) | |
(chosen-string (cond | |
((eq choice ?t) | |
"TODO") | |
((eq choice ?n) | |
"NEXT") | |
((eq choice ?w) | |
"WAITING") | |
(t | |
(user-error "Try again ..."))))) | |
(org-todo chosen-string))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment