diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/calendar/todos.el | 19 |
2 files changed, 19 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 00ea7098ae5..446557b3442 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2013-02-25 Stephen Berman <stephen.berman@gmx.net> | ||
| 2 | |||
| 3 | * calendar/todos.el (todos-key-bindings): Add binding for `todos-show'. | ||
| 4 | (todos-show): Prompt for which todo file to visit when invoked | ||
| 5 | from Todos mode. | ||
| 6 | |||
| 1 | 2013-02-19 Stephen Berman <stephen.berman@gmx.net> | 7 | 2013-02-19 Stephen Berman <stephen.berman@gmx.net> |
| 2 | 8 | ||
| 3 | * calendar/todos.el: Item insertion and done/undo fixes. | 9 | * calendar/todos.el: Item insertion and done/undo fixes. |
diff --git a/lisp/calendar/todos.el b/lisp/calendar/todos.el index 46d419d642c..4dbb1e3f50b 100644 --- a/lisp/calendar/todos.el +++ b/lisp/calendar/todos.el | |||
| @@ -2623,6 +2623,7 @@ which is the value of the user option | |||
| 2623 | (replace-regexp-in-string | 2623 | (replace-regexp-in-string |
| 2624 | "-+" "-" | 2624 | "-+" "-" |
| 2625 | (concat "todos-item-insert-" | 2625 | (concat "todos-item-insert-" |
| 2626 | ;; (concat "todos-insert-item-" | ||
| 2626 | (mapconcat (lambda (e) (if e (symbol-name e))) arglist "-"))))) | 2627 | (mapconcat (lambda (e) (if e (symbol-name e))) arglist "-"))))) |
| 2627 | 2628 | ||
| 2628 | (defvar todos-insertion-commands-names | 2629 | (defvar todos-insertion-commands-names |
| @@ -2675,6 +2676,7 @@ which is the value of the user option | |||
| 2675 | (setq key (concat key key1))))) | 2676 | (setq key (concat key key1))))) |
| 2676 | todos-insertion-commands-arg-key-list) | 2677 | todos-insertion-commands-arg-key-list) |
| 2677 | (if (string-match (concat (regexp-quote "todos-item-insert") "\\_>") cname) | 2678 | (if (string-match (concat (regexp-quote "todos-item-insert") "\\_>") cname) |
| 2679 | ;; (if (string-match (concat (regexp-quote "todos-insert-item") "\\_>") cname) | ||
| 2678 | (setq key (concat key "i"))) | 2680 | (setq key (concat key "i"))) |
| 2679 | (define-key map key c)))) | 2681 | (define-key map key c)))) |
| 2680 | 2682 | ||
| @@ -2720,6 +2722,7 @@ which is the value of the user option | |||
| 2720 | ;; navigation | 2722 | ;; navigation |
| 2721 | ("f" . todos-forward-category) | 2723 | ("f" . todos-forward-category) |
| 2722 | ("b" . todos-backward-category) | 2724 | ("b" . todos-backward-category) |
| 2725 | ("t" . todos-show) | ||
| 2723 | ("j" . todos-jump-to-category) | 2726 | ("j" . todos-jump-to-category) |
| 2724 | ("n" . todos-forward-item) | 2727 | ("n" . todos-forward-item) |
| 2725 | ("p" . todos-backward-item) | 2728 | ("p" . todos-backward-item) |
| @@ -3023,11 +3026,14 @@ which is the value of the user option | |||
| 3023 | ;;;###autoload | 3026 | ;;;###autoload |
| 3024 | (defun todos-show (&optional solicit-file) | 3027 | (defun todos-show (&optional solicit-file) |
| 3025 | "Visit a Todos file and display one of its categories. | 3028 | "Visit a Todos file and display one of its categories. |
| 3026 | With non-nil prefix argument SOLICIT-FILE prompt for which todo | 3029 | |
| 3027 | file to visit; otherwise visit `todos-default-todos-file'. | 3030 | When invoked in Todos mode, prompt for which todo file to visit. |
| 3028 | Subsequent invocations from outside of Todos mode revisit this | 3031 | When invoked outside of Todos mode with non-nil prefix argument |
| 3029 | file or, with option `todos-show-current-file' non-nil (the | 3032 | SOLICIT-FILE prompt for which todo file to visit; otherwise visit |
| 3030 | default), whichever Todos file was last visited. | 3033 | `todos-default-todos-file'. Subsequent invocations from outside |
| 3034 | of Todos mode revisit this file or, with option | ||
| 3035 | `todos-show-current-file' non-nil (the default), whichever Todos | ||
| 3036 | file was last visited. | ||
| 3031 | 3037 | ||
| 3032 | Calling this command before any Todos file exists prompts for a | 3038 | Calling this command before any Todos file exists prompts for a |
| 3033 | file name and an initial category (defaulting to | 3039 | file name and an initial category (defaulting to |
| @@ -3053,7 +3059,8 @@ corresponding Todos file, displaying the corresponding category." | |||
| 3053 | (interactive "P") | 3059 | (interactive "P") |
| 3054 | (let* ((cat) | 3060 | (let* ((cat) |
| 3055 | (show-first todos-show-first) | 3061 | (show-first todos-show-first) |
| 3056 | (file (cond (solicit-file | 3062 | (file (cond ((or (eq major-mode 'todos-mode) |
| 3063 | solicit-file) | ||
| 3057 | (if (funcall todos-files-function) | 3064 | (if (funcall todos-files-function) |
| 3058 | (todos-read-file-name "Choose a Todos file to visit: " | 3065 | (todos-read-file-name "Choose a Todos file to visit: " |
| 3059 | nil t) | 3066 | nil t) |