diff options
| author | Stephen Berman | 2013-06-02 23:37:57 +0200 |
|---|---|---|
| committer | Stephen Berman | 2013-06-02 23:37:57 +0200 |
| commit | 9e6b072c7262858be11172b6d1a4bc1559fbc3eb (patch) | |
| tree | 6bf1292f65b47fa92ade4988fbf9e008e2f60fec | |
| parent | 53e63b4cb930cfe4d756ba5e68e89d6a4e6318da (diff) | |
| download | emacs-9e6b072c7262858be11172b6d1a4bc1559fbc3eb.tar.gz emacs-9e6b072c7262858be11172b6d1a4bc1559fbc3eb.zip | |
* todos.el (todos-show-categories-table): Correct doc string.
(todos-sort-categories-alphabetically-or-numerically): Rename from
todos-sort-categories-alphabetically-or-by-priority and adjust uses.
(todos-set-category-number): Rename from
todos-set-category-priority and adjust uses.
(todos-raise-category): Rename from todos-raise-category-priority
and adjust uses.
(todos-lower-category): Rename from todos-lower-category-priority
and adjust uses.
| -rw-r--r-- | lisp/calendar/ChangeLog | 12 | ||||
| -rw-r--r-- | lisp/calendar/todos.el | 42 |
2 files changed, 33 insertions, 21 deletions
diff --git a/lisp/calendar/ChangeLog b/lisp/calendar/ChangeLog index fdfed1a8899..958d77fa33a 100644 --- a/lisp/calendar/ChangeLog +++ b/lisp/calendar/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2013-06-02 Stephen Berman <stephen.berman@gmx.net> | ||
| 2 | |||
| 3 | * todos.el (todos-show-categories-table): Correct doc string. | ||
| 4 | (todos-sort-categories-alphabetically-or-numerically): Rename from | ||
| 5 | todos-sort-categories-alphabetically-or-by-priority and adjust uses. | ||
| 6 | (todos-set-category-number): Rename from | ||
| 7 | todos-set-category-priority and adjust uses. | ||
| 8 | (todos-raise-category): Rename from todos-raise-category-priority | ||
| 9 | and adjust uses. | ||
| 10 | (todos-lower-category): Rename from todos-lower-category-priority | ||
| 11 | and adjust uses. | ||
| 12 | |||
| 1 | 2013-06-01 Stephen Berman <stephen.berman@gmx.net> | 13 | 2013-06-01 Stephen Berman <stephen.berman@gmx.net> |
| 2 | 14 | ||
| 3 | * todos.el: Some custom cleanup. | 15 | * todos.el: Some custom cleanup. |
diff --git a/lisp/calendar/todos.el b/lisp/calendar/todos.el index 8858d54b4f9..5c2c7b2c721 100644 --- a/lisp/calendar/todos.el +++ b/lisp/calendar/todos.el | |||
| @@ -3069,17 +3069,16 @@ In the initial display the categories are numbered, indicating | |||
| 3069 | their current order for navigating by \\[todos-forward-category] | 3069 | their current order for navigating by \\[todos-forward-category] |
| 3070 | and \\[todos-backward-category]. You can persistantly change the | 3070 | and \\[todos-backward-category]. You can persistantly change the |
| 3071 | order of the category at point by typing | 3071 | order of the category at point by typing |
| 3072 | \\[todos-raise-category-priority] or | 3072 | \\[todos-set-category-number], \\[todos-raise-category] or |
| 3073 | \\[todos-lower-category-priority]. | 3073 | \\[todos-lower-category]. |
| 3074 | 3074 | ||
| 3075 | The labels above the category names and item counts are buttons, | 3075 | The labels above the category names and item counts are buttons, |
| 3076 | and clicking these changes the display: sorted by category name | 3076 | and clicking these changes the display: sorted by category name |
| 3077 | or by the respective item counts (alternately descending or | 3077 | or by the respective item counts (alternately descending or |
| 3078 | ascending). In these displays the categories are not numbered | 3078 | ascending). In these displays the categories are not numbered |
| 3079 | and \\[todos-raise-category-priority] and | 3079 | and \\[todos-set-category-number], \\[todos-raise-category] and |
| 3080 | \\[todos-lower-category-priority] are | 3080 | \\[todos-lower-category] are disabled. (Programmatically, the |
| 3081 | disabled. (Programmatically, the sorting is triggered by passing | 3081 | sorting is triggered by passing a non-nil SORTKEY argument.) |
| 3082 | a non-nil SORTKEY argument.) | ||
| 3083 | 3082 | ||
| 3084 | In addition, the lines with the category names and item counts | 3083 | In addition, the lines with the category names and item counts |
| 3085 | are buttonized, and pressing one of these button jumps to the | 3084 | are buttonized, and pressing one of these button jumps to the |
| @@ -3092,7 +3091,7 @@ are shown in `todos-archived-only' face." | |||
| 3092 | (let (sortkey) | 3091 | (let (sortkey) |
| 3093 | (todos-update-categories-display sortkey))) | 3092 | (todos-update-categories-display sortkey))) |
| 3094 | 3093 | ||
| 3095 | (defun todos-sort-categories-alphabetically-or-by-priority () | 3094 | (defun todos-sort-categories-alphabetically-or-numerically () |
| 3096 | "Sort table of categories alphabetically or numerically." | 3095 | "Sort table of categories alphabetically or numerically." |
| 3097 | (interactive) | 3096 | (interactive) |
| 3098 | (save-excursion | 3097 | (save-excursion |
| @@ -3153,13 +3152,14 @@ are shown in `todos-archived-only' face." | |||
| 3153 | ;; Align with beginning of category label. | 3152 | ;; Align with beginning of category label. |
| 3154 | (forward-char (+ 4 (length todos-categories-number-separator))))) | 3153 | (forward-char (+ 4 (length todos-categories-number-separator))))) |
| 3155 | 3154 | ||
| 3156 | (defun todos-set-category-priority (&optional arg) | 3155 | (defun todos-set-category-number (&optional arg) |
| 3157 | "Change priority of category at point in Todos Categories buffer. | 3156 | "Change number of category at point in the table of categories. |
| 3158 | 3157 | ||
| 3159 | With ARG nil, prompt for the new priority number. Alternatively, | 3158 | With ARG nil, prompt for the new number. Alternatively, the |
| 3160 | the new priority can be provided by a numerical prefix ARG. | 3159 | enter the new number with numerical prefix ARG. Otherwise, if |
| 3161 | Otherwise, if ARG is either of the symbols `raise' or `lower', | 3160 | ARG is either of the symbols `raise' or `lower', raise or lower |
| 3162 | raise or lower the category's priority by one." | 3161 | the category line in the table by one, respectively, thereby |
| 3162 | decreasing or increasing its number." | ||
| 3163 | (interactive "P") | 3163 | (interactive "P") |
| 3164 | (let ((curnum (save-excursion | 3164 | (let ((curnum (save-excursion |
| 3165 | ;; Get the number representing the priority of the category | 3165 | ;; Get the number representing the priority of the category |
| @@ -3207,15 +3207,15 @@ raise or lower the category's priority by one." | |||
| 3207 | (forward-line (1+ priority)) | 3207 | (forward-line (1+ priority)) |
| 3208 | (forward-char col)))))) | 3208 | (forward-char col)))))) |
| 3209 | 3209 | ||
| 3210 | (defun todos-raise-category-priority () | 3210 | (defun todos-raise-category () |
| 3211 | "Raise priority of category at point in Todos Categories buffer." | 3211 | "Raise priority of category at point in Todos Categories buffer." |
| 3212 | (interactive) | 3212 | (interactive) |
| 3213 | (todos-set-category-priority 'raise)) | 3213 | (todos-set-category-number 'raise)) |
| 3214 | 3214 | ||
| 3215 | (defun todos-lower-category-priority () | 3215 | (defun todos-lower-category () |
| 3216 | "Lower priority of category at point in Todos Categories buffer." | 3216 | "Lower priority of category at point in Todos Categories buffer." |
| 3217 | (interactive) | 3217 | (interactive) |
| 3218 | (todos-set-category-priority 'lower)) | 3218 | (todos-set-category-number 'lower)) |
| 3219 | 3219 | ||
| 3220 | ;; ----------------------------------------------------------------------------- | 3220 | ;; ----------------------------------------------------------------------------- |
| 3221 | ;;; Searching | 3221 | ;;; Searching |
| @@ -5977,14 +5977,14 @@ Filtered Items mode following todo (not done) items." | |||
| 5977 | (defvar todos-categories-mode-map | 5977 | (defvar todos-categories-mode-map |
| 5978 | (let ((map (make-sparse-keymap))) | 5978 | (let ((map (make-sparse-keymap))) |
| 5979 | (suppress-keymap map) | 5979 | (suppress-keymap map) |
| 5980 | (define-key map "c" 'todos-sort-categories-alphabetically-or-by-priority) | 5980 | (define-key map "c" 'todos-sort-categories-alphabetically-or-numerically) |
| 5981 | (define-key map "t" 'todos-sort-categories-by-todo) | 5981 | (define-key map "t" 'todos-sort-categories-by-todo) |
| 5982 | (define-key map "y" 'todos-sort-categories-by-diary) | 5982 | (define-key map "y" 'todos-sort-categories-by-diary) |
| 5983 | (define-key map "d" 'todos-sort-categories-by-done) | 5983 | (define-key map "d" 'todos-sort-categories-by-done) |
| 5984 | (define-key map "a" 'todos-sort-categories-by-archived) | 5984 | (define-key map "a" 'todos-sort-categories-by-archived) |
| 5985 | (define-key map "#" 'todos-set-category-priority) | 5985 | (define-key map "#" 'todos-set-category-number) |
| 5986 | (define-key map "l" 'todos-lower-category-priority) | 5986 | (define-key map "l" 'todos-lower-category) |
| 5987 | (define-key map "r" 'todos-raise-category-priority) | 5987 | (define-key map "r" 'todos-raise-category) |
| 5988 | (define-key map "n" 'todos-next-button) | 5988 | (define-key map "n" 'todos-next-button) |
| 5989 | (define-key map "p" 'todos-previous-button) | 5989 | (define-key map "p" 'todos-previous-button) |
| 5990 | (define-key map [tab] 'todos-next-button) | 5990 | (define-key map [tab] 'todos-next-button) |