diff options
author | memeplex <carlosjosepita@gmail.com> | 2019-02-21 16:09:58 -0300 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-02-22 19:43:16 +0100 |
commit | b0932f703e949fc458d8f106ceff0041d6d7ddb8 (patch) | |
tree | c95c7ad35c088bac976f793d4b7e15b191b6756d | |
parent | d6fcfc06cef3356a0cbe58e452f1ed2946659623 (diff) | |
download | org-mode-b0932f703e949fc458d8f106ceff0041d6d7ddb8.tar.gz |
org-agenda: improve todo states completion
* lisp/org-agenda.el (org-todo-list): prepare agenda buffers before
prompting for state.
-rw-r--r-- | lisp/org-agenda.el | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 489ecec..0e7ce1d 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -4672,18 +4672,8 @@ for a keyword. A numeric prefix directly selects the Nth keyword in (when (and (stringp arg) (not (string-match "\\S-" arg))) (setq arg nil)) (let* ((today (org-today)) (date (calendar-gregorian-from-absolute today)) - (kwds org-todo-keywords-for-agenda) (completion-ignore-case t) - (org-select-this-todo-keyword - (if (stringp arg) arg - (and arg (integerp arg) (> arg 0) - (nth (1- arg) kwds)))) - rtn rtnall files file pos) - (when (equal arg '(4)) - (setq org-select-this-todo-keyword - (completing-read "Keyword (or KWD1|K2D2|...): " - (mapcar #'list kwds) nil nil))) - (and (equal 0 arg) (setq org-select-this-todo-keyword nil)) + kwds org-select-this-todo-keyword rtn rtnall files file pos) (catch 'exit (when org-agenda-sticky (setq org-agenda-buffer-name @@ -4692,6 +4682,16 @@ for a keyword. A numeric prefix directly selects the Nth keyword in org-select-this-todo-keyword) (format "*Org Agenda(%s)*" (or org-keys "t"))))) (org-agenda-prepare "TODO") + (setq kwds org-todo-keywords-for-agenda + org-select-this-todo-keyword (if (stringp arg) arg + (and (integerp arg) + (> arg 0) + (nth (1- arg) kwds)))) + (when (equal arg '(4)) + (setq org-select-this-todo-keyword + (completing-read "Keyword (or KWD1|K2D2|...): " + (mapcar #'list kwds) nil nil))) + (and (equal 0 arg) (setq org-select-this-todo-keyword nil)) (org-compile-prefix-format 'todo) (org-set-sorting-strategy 'todo) (setq org-agenda-redo-command |