* todos.el (todos-item-undone): Remove item highlighting when user
[bpt/emacs.git] / lisp / calendar / ChangeLog
1 2013-05-11 Stephen Berman <stephen.berman@gmx.net>
2
3 * todos.el (todos-item-undone): Remove item highlighting when user
4 quits before deciding whether to omit comment. Fix misplaced
5 closing paren. Change two uses of `if' to `when'.
6
7 2013-05-10 Stephen Berman <stephen.berman@gmx.net>
8
9 * todos.el: Rename numerous commands and defcustoms and adjust all
10 uses, change numerous key bindings, make some basic commands
11 noninteractive and use them to define the commands, unify
12 archiving commands.
13 (todos-directory): Rename from todos-files-directory.
14 (todos-print-buffer-function): Rename from todos-print-function.
15 (todos-number-prefix): Rename from todos-number-priorities.
16 (todos-top-priorities-overrides): Rename from todos-priorities-rules.
17 (todos-top-priorities): Rename from todos-show-priorities.
18 (todos-insertion-command-name, todos-insertion-key-bindings):
19 Use "todos-insert-item-".
20 (todos-key-bindings, todos-archive-mode-map)
21 (todos-categories-mode-map, todos-filtered-items-mode-map):
22 Adjust to renamed commands, make bindings more systematic,
23 reorder entries.
24 (todos-show-categories-table): Rename from todos-display-categories.
25 (todos-sort-categories-alphabetically-or-by-priority): Rename from
26 todos-display-categories-alphabetically-or-by-priority.
27 (todos-sort-categories-by-todo): Rename from
28 todos-display-categories-sorted-by-todo.
29 (todos-sort-categories-by-diary): Rename from
30 todos-display-categories-sorted-by-diary.
31 (todos-sort-categories-by-done): Rename from
32 todos-display-categories-sorted-by-done.
33 (todos-sort-categories-by-archived): Rename from
34 todos-display-categories-sorted-by-archived.
35 (todos-print-buffer): Rename function from todos-print.
36 (todos-print-buffer-to-file): Rename from todos-print-to-file.
37 (todos-go-to-source-item): Rename from todos-jump-to-item.
38 (todos-forward-item, todos-backward-item): Remove interactive form
39 and move most of doc string and prefix argument error checking to...
40 (todos-next-item, todos-previous-item): ...these new commands,
41 which use the preceding functions.
42 (todos-next-button): Rename from todos-forward-button.
43 (todos-previous-button): Rename from todos-backward-button.
44 (todos-toggle-prefix-numbers): Rename from
45 todos-hide-show-item-numbering.
46 (todos-toggle-view-done-items): Rename from todos-hide-show-done-items.
47 (todos-toggle-view-done-only): Rename from todos-show-done-only.
48 (todos-toggle-item-highlighting): Rename from todos-highlight-item.
49 (todos-toggle-item-header): Rename from todos-hide-show-date-time.
50 (todos-toggle-mark-item): Rename from todos-mark-unmark-item.
51 (todos-filter-top-priorities): Rename from todos-top-priorities.
52 (todos-filter-top-priorities-multifile): Rename from
53 todos-top-priorities-multifile.
54 (todos-filter-diary-items): Rename from todos-diary-items.
55 (todos-filter-diary-items-multifile): Rename from
56 todos-diary-items-multifile.
57 (todos-filter-regexp-items): Rename from todos-regexp-items.
58 (todos-filter-regexp-items-multifile): Rename from
59 todos-regexp-items-multifile.
60 (todos-insert-item-1): Remove interactive form, since
61 todos-insert-item is generated like other item insertion commands.
62 (todos-edit-file): Rename from todos-edit-multiline.
63 (todos-item-undone): Rename from todos-item-undo.
64 (todos-archive-done-item): Add raw prefix spec to interactive form
65 and use it to test for archiving all done items in category;
66 reorder tests in function body accordingly.
67 (todos-archive-category-done-items): Remove.
68
69 2013-04-27 Stephen Berman <stephen.berman@gmx.net>
70
71 * todos.el (todos-edit-multiline-item): Make a no-op when point is
72 not on an item.
73
74 2013-04-24 Stephen Berman <stephen.berman@gmx.net>
75
76 * todos.el (todos-check-format): Add check of well-formedness of
77 categories sexp. If it is well-formed but differs from
78 todos-categories, do not signal an error but display a message.
79
80 2013-04-21 Stephen Berman <stephen.berman@gmx.net>
81
82 * todos.el: Fixes and improvements related to item relocation.
83 (todos-category-completions): On ensuring proper category display,
84 if done items in category are visible, keep them visible.
85 (todos-set-item-priority): Keep top of category in view while
86 setting priority.
87 (todos-move-item): Restore prevention of moving within the same
88 category. Move done items to top, not end, of done items section.
89 When user quits before setting priority, make sure to return to
90 starting file.
91 (todos-item-undo): Partly reimplement along lines of
92 todos-move-item, adding highlighting of single item as undo
93 target, setting priority of multiple undone items, improving
94 handling of quitting before setting priority.
95 (todos-unarchive-items): Restore items to top, not end, of
96 category's done section.
97
98 2013-04-19 Stephen Berman <stephen.berman@gmx.net>
99
100 * todos.el: Extend and improve item filtering and handling of
101 saved files of filtered items.
102 (todos-show-first): Add choices for diary and regexp items.
103 (todos-absolute-file-name): Handle file names for diary and regexp
104 items.
105 (todos-filter-items): New function abstracted from item filtering
106 commands, with handling of saved files of diary and regexp items.
107 (todos-filter-items-1): Rename from todos-filter-items.
108 (todos-filtered-buffer-name): Remove, since functionality is now
109 incorporated into new function todos-filter-items.
110 (todos-filtered-items-buffer, todos-top-priorities-buffer)
111 (todos-diary-items-buffer, todos-regexp-items-buffer):
112 Make defconsts instead of defcustoms.
113 (todos-find-item): Restrict calculation and comparison of
114 priorities to top priority items, in order to handle diary and
115 regexp items.
116 (todos-check-filtered-items-file): Rename from
117 todos-check-top-priorities and adjust message and callers.
118 (todos-filter-items-filename): Rename from
119 todos-top-priorities-filename, adjusting caller and extending to
120 files of filtered diary and regexp items.
121 (todos-save-filtered-items-buffer): Rename from
122 todos-save-top-priorities-buffer and adjust caller and uses. Use
123 write-file instead of write-region and use existing file name if
124 previously saved.
125 (todos-show): Handle initially displaying saved file of filtered
126 diary or regexp items.
127 (todos-top-priorities, todos-top-priorities-multifile)
128 (todos-diary-items, todos-diary-items-multifile)
129 (todos-regexp-items, todos-regexp-items-multifile): Use new
130 function todos-filter-items.
131 (auto-mode-alist): Extend regexp for files assigned to
132 todos-filtered-items-mode to handle saved diary and regexp items.
133
134 2013-03-17 Stephen Berman <stephen.berman@gmx.net>
135
136 * calendar/todos.el (todos-insert-item): Fix mistake in logic of
137 here insertion from last change, and ensure category is set when
138 command is called from outside Todos buffer.
139
140 2013-03-15 Stephen Berman <stephen.berman@gmx.net>
141
142 * calendar/todos.el: Item unarchiving fixes and improvements.
143 (todos-archive-mode-map): Add bindings for item and category
144 marking/unmarking; make todos-display-categories binding same as
145 in Todos mode; remove todos-unarchive-category binding.
146 (todos-unarchive-category): Remove.
147 (todos-unarchive-items): Fix handling of marked items. Remove
148 code for unarchiving whole category, since that is covered by
149 unarchiving marked items. Handle unarchiving items to a category
150 that had been deleted from the todo file by re-adding the
151 category. Use todos-category-select to display restored items,
152 not todos-show. Remove obsolete or superfluous code.
153
154 2013-03-15 Stephen Berman <stephen.berman@gmx.net>
155
156 * calendar/todos.el (todos-reset-prefix): Don't remove overlays,
157 since it's superfluous and also wrongly removes items marks.
158 (todos-category-completions): Select current category on visiting
159 file, to ensure category is properly displayed if user switches to
160 file via a non-Todos command.
161 (todos-mark-category): Make implementation cleaner.
162 (todos-unmark-category): Improve implementation. Get overlay
163 property only when there is an overlay.
164
165 2013-03-14 Stephen Berman <stephen.berman@gmx.net>
166
167 * calendar/todos.el (todos-insert-item): Fix last change to make
168 sure calling insertion "here" from outside goal todo items section
169 gives new item top priority. With priority insertion, if user
170 cancels before setting priority, restore display.
171 (todos-find-item): Restore narrowing after searching.
172 (todos-item-done): Allow adding (same) comment to marked items.
173 Don't add empty comment to done item.
174
175 2013-03-13 Stephen Berman <stephen.berman@gmx.net>
176
177 * calendar/todos.el (todos-quit): If quitting
178 todos-filtered-items-mode makes todos-mode current, don't call
179 todos-show, which (here wrongly) prompts for a new Todos file.
180 (todos-delete-category): Fix incorrect quotation mark.
181 (todos-set-item-priority): Make prefix argument a no-op with
182 commands for raising or lowering item priority. Move mistakenly
183 placed right paren to end of defun, where it belongs.
184
185 2013-02-25 Stephen Berman <stephen.berman@gmx.net>
186
187 * calendar/todos.el (todos-key-bindings): Add binding for `todos-show'.
188 (todos-show): Prompt for which todo file to visit when invoked
189 from Todos mode.
190
191 2013-02-19 Stephen Berman <stephen.berman@gmx.net>
192
193 * calendar/todos.el: Item insertion and done/undo fixes.
194 (todos-insert-item): Maybe set the insertion file to
195 todos-global-current-todos-file. When inserting into a file that
196 was not being visited on invoking this command, ensure chosen
197 category is properly selected. Make item inserted "here" the
198 first todo item if the command was invoked with point in done
199 items section or outside of the current category.
200 (todos-item-done): When done items are shown, put cursor on first
201 just done item.
202 (todos-item-undo): Put cursor on undone item.
203
204 2013-02-16 Stephen Berman <stephen.berman@gmx.net>
205
206 * calendar/todos.el: Improve handling of overlays.
207 (todos-get-overlay): New function.
208 (todos-prefix-overlay): Remove, since subsumed by
209 todos-get-overlay, and replace by the latter in callers.
210 (todos-reset-prefix): Apply only to buffer visiting Todos files.
211 Simplify implementation and use `todos' overlay property.
212 (todos-reset-done-separator): Use todos-get-overlay and `todos'
213 overlay property. Fix logic.
214 (todos-category-select): Use todos-get-overlay and `todos' overlay
215 property.
216 (todos-remove-item): Use todos-get-overlay. Correct obsolete code.
217 (todos-prefix-overlays): Use todos-top-priority face also for
218 non-numerical prefix of top priority items. Add `todos' overlay
219 property.
220 (todos-hide-show-date-time): Simplify, using todos-get-overlay and
221 `todos' overlay property.
222
223 2013-02-14 Stephen Berman <stephen.berman@gmx.net>
224
225 * calendar/todos.el (todos-edit-multiline, todos-edit-quit):
226 Revert buffer renaming.
227
228 2013-02-11 Stephen Berman <stephen.berman@gmx.net>
229
230 * calendar/todos.el (todos-edit-quit): On quitting file editing,
231 rename buffer back to current Todos file. After selecting
232 category, put point at top instead of recentering.
233
234 2013-02-08 Stephen Berman <stephen.berman@gmx.net>
235
236 * calendar/todos.el (todos-edit-multiline-item): Revert to using
237 indirect buffer, which makes it easier to return to Todos mode.
238 (todos-edit-quit): Don't delete and reinsert items that don't need
239 indenting. Revert to just killing buffer on quitting single item
240 editing. On quitting file editing, select nearest category.
241
242 2013-02-07 Stephen Berman <stephen.berman@gmx.net>
243
244 * calendar/todos.el: Bug fixes and improvements to item editing
245 and insertion.
246 (todos-check-format): Compare current value of todos-categories
247 with actual categories sexp.
248 (todos-repair-categories-sexp): Add warning to doc string about
249 category order getting restored to list element order.
250 (todos-mode-external-set): When todos-categories is nil, as in
251 Todos Edit mode, set it by reading actual categories sexp.
252 (todos-edit-mode): Make buffer writeable.
253 (todos-done-item-section-p): New function.
254 (todos-insert-item): Use it as part of preventing insertion here
255 in done items section. Move check for display of done items only
256 to just before setting new item's priority, and if cancelled after
257 toggling to todo items, restore display of done items.
258 (todos-edit-multiline-item): Don't base on todos-edit-multiline
259 but just narrow and change mode.
260 (todos-edit-multiline): Don't make indirect buffer but just widen
261 and change mode; also remove overlays.
262 (todos-edit-quit): Restore Todos mode and category display; when
263 quitting multiline item editing, ensure items above edited item
264 are visible in window if possible.
265 (todos-done-item-add-edit-or-delete-comment): If user moved point
266 during editing, make sure it moves back to edited item before
267 returning.
268
269 2013-02-05 Stephen Berman <stephen.berman@gmx.net>
270
271 * calendar/todos.el (todos-reset-done-separator-string):
272 Complete the implementation.
273 (todos-hide-show-done-items): If start of done items sections is
274 below the bottom of the window, make it visible.
275 (todos-insert-item): Allow inserting item here to work outside of
276 the current category, but then at top of category. After checking
277 whether only done items are shown, restore point to ensure
278 inserting item here works correctly.
279 (todos-set-item-priority): Delete leftover right paren at end.
280
281 2013-02-04 Stephen Berman <stephen.berman@gmx.net>
282
283 * calendar/todos.el: Bug fixes involving or displaying done items.
284 (todos-done-separator): Make length of long separator one less
285 than window-width, in order to avoid following empty line.
286 (todos-forward-item, todos-backward-item): Make empty line below
287 last todo item accessible only by invoking without a numerical
288 prefix argument and make the latter invocations move only to items.
289 (todos-insert-item): Set todos-current-todos-file after selecting
290 buffer, in order not to set global value. If only done items are
291 shown when this command is invoked, toggle to show todo items to
292 avoid insertion into done items section. When done items are
293 shown, protect from cancelling before setting item priority: this
294 also needs recentering to display all items.
295 (todos-set-item-priority): Only call on (not done) todo items.
296 Check that done items are visible not because file is widened.
297 Use only `any' argument of called-interactively-p. Make sure that
298 giving an undone item lowest priority restores it to the todo
299 section.
300 (todos-item-done): If done items are visible on invoking this
301 command, keep them visible afterwards. Stop looking for marked
302 items on reaching the empty line below the last todo item.
303
304 2013-02-02 Stephen Berman <stephen.berman@gmx.net>
305
306 * calendar/todos.el: Several small fixes and improvements.
307 (todos-done-separator-string): Change default value.
308 (todos-update-categories-sexp): Remove unnecessary and misquided
309 setq of todos-default-todos-file. Use delete-region instead of
310 kill-region to avoid polluting kill-ring.
311 (todos-unload-hook): Remove (was not used).
312 (todos-edit-multiline): Don't generate new edit buffer name on
313 each invocation---that can cause confusion due to indirect buffer.
314 (todos-edit-quit): Ensure lines in edit buffer that follow hard
315 newlines are indented in the file to conform to diary format.
316 (todos-set-item-priority): If done items in category are visible,
317 keep them visible.
318
319 2013-01-30 Stephen Berman <stephen.berman@gmx.net>
320
321 * calendar/todos.el: Fix done separator overlay bug. Remove most
322 FIXME comments.
323 (todos-reset-and-enable-done-separator): Remove commented out
324 workaround for done separator overlay bug; fix doc string.
325 (todos-reset-done-separator): Delete old overlay after adding new
326 overlay to fix done separator overlay bug; improve implementation.
327 (todos-prefix-overlays): Improve first line of doc string.
328
329 2013-01-29 Stephen Berman <stephen.berman@gmx.net>
330
331 * calendar/todos.el: Improve item marking and handling of marked items.
332 (todos-prefix): Add validator to ensure value differs from that of
333 todos-item-mark.
334 (todos-item-mark): New defcustom.
335 (todos-prefix-overlay): New function.
336 (todos-marked-item-p): Use it. Adapt implementation to new
337 handling of marked items.
338 (todos-insert-with-overlays): When inserting pushes down a marked
339 item, move its prefix overlay.
340 (todos-prefix-overlays): Add overlay even when prefix is empty string,
341 otherwise item marking fails. Improve handling of marked items.
342 (todos-mark-unmark-item): Adapt to new handling of marked items
343 and simplify by removing marking of all items in category.
344 (todos-mark-category): Adapt to new handling of marked items and
345 don't use todos-mark-unmark-item.
346 (todos-unmark-category): Adapt to new handling of marked items.
347 (todos-delete-item): Remove obsolete handling of marked items and
348 useless restoration of point.
349 (todos-set-item-priority): Use new handling of marked items.
350 (todos-move-item, todos-item-done, todos-item-undo)
351 (todos-archive-done-item): Remove obsolete handling of marked items.
352
353 2013-01-25 Stephen Berman <stephen.berman@gmx.net>
354
355 * calendar/todos.el: Improve definitions and use of some faces.
356 (todos-top-priority): Use current definition of font-lock-constant-face.
357 (todos-diary-expired): Make default value contrast more with
358 default value of todos-date face.
359 (todos-nondiary, todos-category-string): New faces.
360 (todos-nondiary-face, todos-category-string-face): Corresponding
361 new variables.
362 (todos-done, todos-comment): Switch default values to go better
363 with default value of todos-date face.
364 (todos-done-sep): Change default value.
365 (todos-category-string-matcher-1)
366 (todos-category-string-matcher-2): Improve doc string.
367 (todos-font-lock-keywords): Use todos-nondiary-face and
368 todos-category-string-face.
369 (todos-done-separator): Propertize string with todos-done-sep face.
370 (todos-filtered-items-mode): Fix typo.
371
372 2013-01-23 Stephen Berman <stephen.berman@gmx.net>
373
374 * calendar/todos.el: Improve handling of saved top priorities items.
375 (todos-find-item): Find done items and items whose priority has
376 changed or whose text was truncated or augmented; add doc string.
377 (todos-check-top-priorities): Highlight each item that is not up
378 to date.
379 (todos-jump-to-item): Jump to items whose priority has changed or
380 whose text was truncated or augmented.
381
382 2013-01-22 Stephen Berman <stephen.berman@gmx.net>
383
384 * calendar/todos.el: Revise handling of initial display and extend
385 to top priorities file.
386 (todos-display-categories-first): Remove, replacing by this:
387 (todos-show-first): New defcustom.
388 (todos-first-visit): Remove, replacing by this:
389 (todos-visited): New variable.
390 (todos-absolute-file-name): Extend possible values of optional
391 argument to take top priorities files into account.
392 (todos-modes-set-3, todos-mode): Remove use of todos-first-visit.
393 (todos-mode-external-set): Call find-file-noselect instead of
394 find-buffer-visiting, since the latter may fail.
395 (todos-show): Revise handling of initial display using
396 todos-show-first and todos-visited and extend to top priorities
397 file.
398 (todos-quit): Adapt to new handling of initial display.
399
400 2013-01-14 Stephen Berman <stephen.berman@gmx.net>
401
402 * calendar/todos.el: Implement saving top priority items buffers,
403 improve implementation of item filtering commands and
404 infrastucture, and fix two bugs.
405 (todos-prefix-overlays): Use todos-top-priority face only in Todos
406 mode.
407 (todos-multiple-filter-files): Get file-truename of Todos file.
408 (todos-filter-items): Pass a list of files from the caller instead
409 of building it here, and move handling of cancelled file selection
410 dialog to callers. Correct omission of file-wide default number
411 of top priorities.
412 (todos-filtered-buffer-name): Treat file-list argument only as a list.
413 (todos-find-item, todos-check-top-priorities)
414 (todos-top-priorities-filename)
415 (todos-save-top-priorities-buffer): New functions.
416 (todos-save): Use todos-save-top-priorities-buffer.
417 (todos-jump-to-item): Refactor and use todos-find-item.
418 (todos-top-priorities): Simplify semantics of prefix argument.
419 Check if top priorities file exists and if so, visit it, reporting
420 whether it is up to date. Add optional argument and use it to
421 handle multiple files.
422 (todos-diary-items, todos-regexp-items): Add optional argument and
423 use it to handle multiple files.
424 (todos-top-priorities-multifile, todos-diary-items-multifile)
425 (todos-regexp-items-multifile): Refactor, using corresponding
426 non-multifile command.
427 (auto-mode-alist): Add pattern for top priorities files to visit
428 these in Todos Filtered Items mode.
429
430 2013-01-08 Stephen Berman <stephen.berman@gmx.net>
431
432 * calendar/todos.el: Fix tabular alignment in Todos Categories mode.
433 (todos-adjusted-category-label-length): New function.
434 (todos-padded-string): Use it.
435
436 2013-01-08 Stephen Berman <stephen.berman@gmx.net>
437
438 * calendar/todos.el (todos-move-item): Allow moving done items to
439 done section of another category.
440
441 2013-01-06 Stephen Berman <stephen.berman@gmx.net>
442
443 * calendar/todos.el: Display numerical priority string of top
444 priority items in category in a distinctive face.
445 (todos-prefix-string): Make doc string more precise.
446 (todos-top-priority): New defface.
447 (todos-done, todos-done-sep): Use more compact face definition
448 \(taken from font-lock.el).
449 (todos-comment): Give a complete face definition, instead of
450 inheriting from todos-done.
451 (todos-font-lock-keywords): Use todos-comment-face for
452 todos-comment-string-matcher.
453 (todos-prefix-overlays): Use todos-top-priority as the face
454 property of top priority items; don't condition reapplying item
455 prefix overlay on whether the string changed, since that prevents
456 updating display after changing number of top priorities.
457 (todos-set-top-priorities): Call todos-prefix-overlays to update
458 display.
459
460 2013-01-04 Stephen Berman <Stephen.Berman@rub.de>
461
462 * calendar/todos.el (todos-reset-global-current-todos-file)
463 (todos-display-categories-1): Use absolute name of
464 todos-default-todos-file.
465
466 2013-01-04 Stephen Berman <Stephen.Berman@rub.de>
467
468 * calendar/todos.el (todos-insert-item): Fix copy and paste error
469 from previous change.
470
471 2013-01-03 Stephen Berman <stephen.berman@gmx.net>
472
473 * calendar/todos.el: Implement extended category completions.
474 (todos-default-todos-file): Change default value to correct custom
475 type.
476 (todos-category-completions-files): New defcustom.
477 (todos-reevaluate-category-completions-files-defcustom)
478 (todos-absolute-file-name, todos-category-completions): New defuns.
479 (todos-reevaluate-filelist-defcustoms):
480 Add todos-category-completions-files and
481 todos-reevaluate-category-completions-files-defcustom.
482 (todos-allcats-file, todos-all-categories-alist)
483 (todos-jump-to-category-other-file, todos-jump-to-any-category)
484 (todos-move-item-to-file): Remove (todos-all-categories-alist both
485 as defvar and as defun).
486 (todos-read-category): Rewrite using extended category completions
487 and better handling of completion against existing or non-existing
488 categories.
489 (todos-validate-name): Correct doc string; use local instead of
490 dynamic variables in function body.
491 (todos-insert-category-line): Adjust use of todos-jump-to-category
492 to new argument list.
493 (todos-key-bindings, todos-menu): Delete entries for removed
494 commands.
495 (todos-show): Get absolute name of todos-default-todos-file;
496 add `nowarn' argument to find-file-noselect; adjust use of
497 todos-add-category to new argument list.
498 (todos-jump-to-category): Rewrite using extended category
499 completions; reverse argument list, adapting FILE argument to new
500 completion mechanism; add autoload cookie; call todos-show if
501 there are no Todos files.
502 (todos-add-category): Rewrite using extended category completions;
503 add FILE argument to accommodate new completion mechanism.
504 (todos-merge-category): Adapt to extended category completions,
505 adding prefix argument.
506 (todos-insert-item): Adapt to extended category completions; use
507 todos-read-category instead of todos-jump-to-category in prefix
508 argument calls; call todos-show if there are no Todos files; if
509 item is inserted at end of category, recenter to ensure the items
510 above it are displayed in the window.
511 (todos-move-item): Adapt to extended category completions, making
512 argument prefix argument; allow moving within category (for the
513 sake of code simplification); add `nowarn' argument to
514 find-file-noselect.
515 (todos-archive-done-item): Prevent error when attempting to
516 archive not-done todo item; adjust use of todos-add-category to
517 new argument list.
518
519 2012-12-15 Stephen Berman <stephen.berman@gmx.net>
520
521 * calendar/todos.el (todos-archive-done-item): Fix archiving of
522 all done items in a category and resulting display of todo file.
523
524 2012-12-14 Stephen Berman <stephen.berman@gmx.net>
525
526 * calendar/todos.el (todos-priorities-rules): Fix customization
527 type to prevent mismatch error.
528 (todos-set-top-priorities): Fix rule construction; fix input check;
529 improve prompt.
530
531 2012-12-14 Stephen Berman <stephen.berman@gmx.net>
532
533 * calendar/todos.el (todos-insert-item): If user exits Calendar
534 before choosing a date, cancel item insertion.
535 (todos-set-date-from-calendar): If user exits Calendar before
536 choosing a date, clean up properly.
537
538 2012-12-12 Stephen Berman <stephen.berman@gmx.net>
539
540 * calendar/todos.el: Extend and improve handling of item editing,
541 especially of date/time header.
542 (todos-month-name-array, todos-month-abbrev-array): New defconsts.
543 (todos-date-pattern): Use explicitly numbered groups.
544 (todos-read-date): Optionally read and return just one of the date
545 string components year, month or monthname, day.
546 (todos-key-bindings): Add bindings for new item header editing
547 commands.
548 (todos-edit-item): Exclude date/time header from minibuffer by
549 default; include it by passing a prefix argument.
550 (todos-edit-item-header-1): New function containing the guts of
551 the commands for editing item date/time headers.
552 (todos-edit-item-header): Use it. Condition editing of time
553 string on value of `todos-always-add-time-string'.
554 (todos-edit-item-date-from-calendar): Use todos-edit-item-header-1.
555 (todos-edit-item-date-to-today): Rename from
556 todos-edit-item-date-is-today and use todos-edit-item-header-1.
557 (todos-edit-item-date): Remove.
558 (todos-edit-item-date-day-name, todos-edit-item-date-year)
559 (todos-edit-item-date-month, todos-edit-item-date-day): New commands.
560
561 2012-12-02 Stephen Berman <stephen.berman@gmx.net>
562
563 * calendar/todos.el (todos-show): Fix a comment.
564 (todos-add-category): Prompt for a new category if passed category
565 is the empty string, not nil.
566
567 2012-11-26 Stephen Berman <stephen.berman@gmx.net>
568
569 * calendar/todos.el (todos-make-categories-list)
570 (todos-convert-legacy-files, todos-jump-to-item)
571 (todos-move-category, todos-merge-category)
572 (todos-archive-done-item, todos-unarchive-items): Include end of
573 line in regex searches for beginning of category, in order not to
574 get a category whose name contains the searched for category name.
575
576 2012-11-15 Stephen Berman <stephen.berman@gmx.net>
577
578 * calendar/todos.el (todos-forward-category): Fix typo.
579
580 2012-10-30 Stephen Berman <stephen.berman@gmx.net>
581
582 * calendar/todos.el (todos-define-insertion-command):
583 Let generated insertion commands accept a prefix argument.
584
585 2012-10-08 Stephen Berman <Stephen.Berman@rub.de>
586
587 * calendar/todos.el (todos-move-item): If user quits before
588 completing movement, restore display of initial category; if item
589 is moved to end of target category, make sure the items above it
590 are displayed in the window.
591
592 2012-10-08 Stephen Berman <stephen.berman@gmx.net>
593
594 * calendar/todos.el: Fixes to todos-move-item and some of its
595 subroutines.
596 (todos-move-item): When there are marked items, point need not be
597 on an item; remove obsolete use of todos-add-category, since this
598 is now already done in todos-read-category; fix typo.
599 (todos-diary-item-p): Exclude empty lines.
600 (todos-read-category): Restore point and narrowing after adding
601 new category, to avoid moving to beginning of file when moving
602 marked items to a new category.
603 (todos-set-item-priority): Prompt for priority only when the
604 category has at least one todo item; only use non-nil priority to
605 calculate insertion location.
606 (todos-read-category): Don't reset todos-categories when a new
607 category is added due to todos-move-item or todos-jump-to-item.
608
609 2012-09-24 Stephen Berman <stephen.berman@gmx.net>
610
611 Changes from 2012-07-14 (revision 110020).
612 * calendar/todos.el (todos-copy-item): New command.
613 (todos-insertion-map): Add key binding for it.
614
615 2012-09-24 Stephen Berman <stephen.berman@gmx.net>
616
617 Changes from 2012-07-13 (revision 110019).
618 * calendar/todos.el (todos-undo-item-omit-comment): New defcustom.
619 (todos-item-undo): Use it.
620 (todos-allcats-file, todos-all-categories-alist): New variables.
621 (todos-all-categories-alist): New function.
622 (todos-jump-to-any-category): New command.
623 (todos-move-item): Remove mark overlays from buffer items were
624 moved from; update todos-categories-with-marks,
625
626 2012-09-24 Stephen Berman <stephen.berman@gmx.net>
627
628 Changes from 2012-06-27 (revision 110018).
629 * calendar/todos.el: Further code rearrangement; further new and
630 revised comments.
631 (todos-reevaluate-filelist-defcustoms): Rename from
632 todos-reevaluate-defcustoms and adjust callers.
633 (todos-date-pattern, todos-nondiary-start, todos-nondiary-end)
634 (todos-date-string-start, todos-done-string-start)
635 (todos-item-start): Change from defvar to defconst.
636 (todos-set-top-priorities): Use read-number and simplify.
637 (todos-insert-item): Check whether date-type argument is a string.
638 (todos-set-date-from-calendar): Check whether
639 todos-date-from-calendar is a string; simplify cond clause.
640 (todos-archive-done-item, todos-unarchive-items):
641 Use buffer-substring-no-properties.
642
643 2012-09-23 Stephen Berman <stephen.berman@gmx.net>
644
645 Changes from 2012-06-25 (revision 110017).
646 * calendar/todos.el (todos-item-undo): Fix restoration on
647 cancelling; use buffer-substring-no-properties; comment out code
648 removing mark overlay; fix insertion of undone items; display any
649 remaining done items.
650
651 2012-09-23 Stephen Berman <stephen.berman@gmx.net>
652
653 Changes from 2012-06-24 (revision 110016).
654 * calendar/todos.el: Further significant code rearrangement;
655 further comment revision.
656 (todos-mode-display): New defgroup.
657 (todos-prefix, todos-number-priorities)
658 (todos-done-separator-string, todos-done-string)
659 (todos-comment-string, todos-show-with-done)
660 (todos-mode-line-function, todos-skip-archived-categories)
661 (todos-highlight-item, todos-wrap-lines)
662 (todos-line-wrapping-function): Use it.
663 (todos-item-insertion): New defgroup.
664 (todos-include-in-diary, todos-diary-nonmarking)
665 (todos-nondiary-marker, todos-always-add-time-string)
666 (todos-use-only-highlighted-region): Use it.
667 (todos-forward-button, todos-backward-button): New commands.
668 (todos-categories-mode-map): Use them, replacing forward-button
669 and backward-button.
670 (todos-merge-category): Fix and improve implementation; handle
671 archived items.
672 (todos-insert-item, todos-set-date-from-calendar): Handle setting
673 date by calling todos-insert-item-from-calendar.
674 (todos-delete-item): Fix overlay handling.
675 (todos-move-item): Highlight item to be moved.
676 (todos-item-undo): Handle marked items.
677 (todos-insert-item-from-calendar): Rewrite using
678 todos-date-from-calendar.
679
680 2012-09-23 Stephen Berman <stephen.berman@gmx.net>
681
682 Changes from 2012-06-21 (revision 110015).
683 * calendar/todos.el: Further comment revision.
684 (todos-sorted-column): Change default value, also taking tty into
685 account.
686 (todos-reset-done-separator): Fix faulty variable binding.
687 (todos-reset-and-enable-done-separator): Save match data; comment
688 out code that causes problems for Edebug.
689 (todos-item-start): Handle empty line between todo and done items
690 when done items are hidden.
691 (todos-read-date): Use a leap year for `*' to allow
692 calendar-last-day-of-month to return Feb. 29.
693 (todos-archive-mode, todos-edit-mode, todos-categories-mode)
694 (todos-filtered-items-mode): Delete faulty parentheses.
695 (todos-quit): Save Todos and archive files unconditionally.
696 (todos-forward-item): Accept only positive prefix argument.
697 (todos-backward-item): Accept only positive prefix argument; don't
698 move point to beginning of buffer if it is on the first item.
699 (todos-hide-show-date-time): Remove obsolete interactive spec.
700 (todos-move-category): Improve prompt string; ensure file moved to
701 is different from file moved from.
702 (todos-merge-categories): Remove.
703 (todos-set-category-priority): New command.
704 (todos-raise-category-priority, todos-lower-category-priority):
705 Use it to define these commands.
706 (todos-set-item-priority): Rewrite and generalize.
707 (todos-raise-item-priority, todos-lower-item-priority): Use it to
708 define these commands.
709
710 2012-09-23 Stephen Berman <stephen.berman@gmx.net>
711
712 Changes from 2012-06-15 (revision 110014).
713 * calendar/todos.el (todos-reset-done-separator)
714 (todos-reset-and-enable-done-separator): New functions.
715 (todos-reset-done-separator-string): Rewrite using
716 todos-reset-done-separator for string longer than 1 character.
717 (todos-mode): Add todos-reset-and-enable-done-separator to
718 window-configuration-change-hook, replacing previous anonymous
719 function.
720 (todos-unload-hook): And remove it.
721
722 2012-09-23 Stephen Berman <stephen.berman@gmx.net>
723
724 Changes from 2012-06-14 (revision 110013).
725 * calendar/todos.el (todos-done-separator-string): New defcustom.
726 (todos-done-separator): New variable replacing defcustom of the
727 same name.
728 (todos-reset-done-separator-string, todos-done-separator):
729 New functions.
730 (todos-mode): Make function added to
731 window-configuration-change-hook do a better job of updating the
732 done items separator string overlay.
733 (todos-unload-hook): Remove it here.
734 (todos-item-undo): Fix search for item's end.
735
736 2012-09-23 Stephen Berman <stephen.berman@gmx.net>
737
738 Changes from 2012-06-03 (revision 110012).
739 * calendar/todos.el: Further comment revision.
740 (todos-sorted-column): Change default value.
741 (todos-item-start): Handle empty category (needed in
742 todos-filter-items).
743 (todos-read-date): Don't use calendar-read; make code cleaner.
744 (todos-multiple-filter-files): Rename this variable from
745 todos-multiple-files and adjust users.
746 (todos-multiple-filter-files-widget): Rename from
747 todos-multiple-files-widget and adjust users.
748 (todos-multiple-filter-files): Rename this function from
749 todos-multiple-files and adjust callers.
750 (todos-filter-items): Remove unused code.
751 (todos-insert-category-line): Add space so highlighting of last
752 column is consistent with the others; adjust display of column
753 highlighting.
754 (todos-menu): Remove obsolete entry.
755 (todos-categories-mode-map): Add new bindings.
756 (todos-display-categories-alphabetically-or-by-priority): New command.
757 (todos-display-categories-sorted-by-todo)
758 (todos-display-categories-sorted-by-diary)
759 (todos-display-categories-sorted-by-done)
760 (todos-display-categories-sorted-by-archived): Restore and fix
761 implementation.
762
763 2012-09-23 Stephen Berman <stephen.berman@gmx.net>
764
765 Changes from 2012-06-02 (revision 110011).
766 * calendar/todos.el: Significant code rearrangement; further
767 comment revision.
768 (todos-filtered-items-buffer): Rename from todos-filter-buffer and
769 adjust users.
770 (todos-filtered-buffer-name): Rename from
771 todos-special-buffer-name and adjust users.
772 (todos-filtered-items-mode-map): Rename from
773 todos-filter-items-mode-map and adjust users.
774 (todos-mode-external-set): Use todos-categories instead of
775 todos-set-categories (and add comment to check if this DTRT).
776 (todos-filtered-items-mode): Rename from todos-filter-items-mode
777 and adjust users.
778 (todos-add-category): Don't call todos-validate-name, since
779 todos-read-category does.
780 (todos-edit-quit): Use todos-repair-categories-sexp.
781 (todos-done-item-add-edit-or-delete-comment): Rename from
782 todos-done-item-add-or-edit-comment and adjust users; add optional
783 argument to prompt to delete comment.
784 (todos-item-undo): Delete done item comment on undoing if user
785 confirms.
786
787 2012-09-22 Stephen Berman <stephen.berman@gmx.net>
788
789 Changes from 2012-06-02 (revision 110010).
790 * calendar/todos.el: Further code rearrangement and comment
791 revision.
792 (todos-item-start): Handle empty line between todo and done items
793 when done items are displayed.
794 (todos-key-bindings): Comment out bindings meant only for
795 todos-archive-mode.
796 (todos-archive-mode-map): Fix typo.
797 (todos-archive-mode): Derive from special-mode instead of
798 todos-mode to prevent its key bindings from being available here.
799 (todos-archive-done-item): Remove obsolete code; fix item count
800 updating.
801 (todos-unarchive-items): Simplify; fix unarchiving of all items in
802 category; fix item count updating; fix typo.
803
804 2012-09-22 Stephen Berman <stephen.berman@gmx.net>
805
806 Changes from 2012-06-01 (revision 110009).
807 * calendar/todos.el: Further code rearrangement and comment
808 revision.
809 (todos-add-to-buffer-list, todos-update-buffer-list): New functions.
810 (todos-file-buffers): New variable.
811 (todos-reset-global-current-todos-file): Use it to simplify
812 implementation of this function.
813 (todos-filtered): New defgroup.
814 (todos-filter-buffer, todos-top-priorities-buffer)
815 (todos-diary-items-buffer, todos-regexp-items-buffer)
816 (todos-priorities-rules, todos-show-priorities)
817 (todos-filter-files, todos-filter-done-items): Use it.
818 (todos-skip-archived-categories): Rename from
819 todos-ignore-archived-categories and adjust users.
820 (todos-display-as-todos-file): Rename from todos-after-find-file
821 and adjust callers.
822 (todos-reset-highlight-item, todos-mode-external-set)
823 (todos-jump-to-category, todos-jump-to-item)
824 (todos-raise-category-priority, todos-insert-item)
825 (todos-move-item): Use find-file-visiting.
826 (todos-make-categories-list): Use file-truename.
827 (todos-display-categories-1): Adjust title text for archive files;
828 use done label for item counts in archive files.
829 (todos-modes-set-3): Add todos-display-as-todos-file to
830 find-file-hook.
831 (todos-mode): Add todos-add-to-buffer-list to find-file-hook and
832 todos-update-buffer-list post-command-hook.
833 (todos-unload-hook): And remove them.
834 (todos-show): Only when interactively invoked from an archive,
835 switch to corresponding Todos file.
836 (todos-archive-done-item): Remove obsolete code; fix handling of
837 marked items; fix search for existing category; check whether
838 archive exists and write to file if not; improve display handling.
839
840 2012-09-21 Stephen Berman <stephen.berman@gmx.net>
841
842 Changes from 2012-05-29 (revision 110008).
843 * calendar/todos.el: Further comment revision.
844 (todos-item-end): Replace use of command todos-forward-item by
845 regexp searches using internal variables.
846 (todos-raise-category-priority): Improve and comment.
847 (todos-insert-item): Fix insertion of empty time string.
848
849 2012-09-21 Stephen Berman <stephen.berman@gmx.net>
850
851 Changes from 2012-05-29 (revision 110007).
852 * calendar/todos.el (todos-ignore-archived-categories):
853 Revert last change; remove :initialize and :set functions; change
854 use and change users accordingly.
855 (todos-reset-categories, todos-categories-full)
856 (todos-truncate-categories-list): Remove.
857 (todos-set-categories, todos-update-categories-sexp):
858 Use todos-categories instead of todos-categories-full; remove use
859 of todos-ignore-archived-categories and
860 todos-truncate-categories-list.
861 (todos-check-format, todos-repair-categories-sexp):
862 Use todos-categories instead of todos-categories-full.
863 (todos-read-category): Improve last change.
864 (todos-validate-name): Use completing-read.
865 (todos-categories-category-number): Rename from
866 todos-category-number and adjust users.
867 (todos-update-categories-display, todos-mode-external-set)
868 (todos-delete-category, todos-move-category, todos-merge-category)
869 (todos-unarchive-items): Remove use of todos-categories-full and
870 todos-ignore-archived-categories.
871 (todos-modes-set-3, todos-add-category): Remove use of
872 todos-categories-full.
873 (todos-edit-mode): Fix typo.
874 (todos-forward-category): Use todos-ignore-archived-categories.
875
876 2012-09-21 Stephen Berman <stephen.berman@gmx.net>
877
878 Changes from 2012-05-28 (revision 110006).
879 * calendar/todos.el: Doubts about todos-ignore-archived-categories.
880 (todos-ignore-archived-categories): Change default value.
881
882 2012-09-21 Stephen Berman <stephen.berman@gmx.net>
883
884 Changes from 2012-05-27 (revision 110005).
885 * calendar/todos.el: Further comment revision.
886 (todos-reset-global-current-todos-file):
887 Try to make this not slow down kill-buffer.
888 (todos-update-categories-sexp): Handle the case where there is no
889 categories sexp yet, i.e. after inserting the first item in the
890 file, so todos-display-categories works.
891 (todos-read-file-name): Improve implementation.
892 (todos-validate-name): Use variable todos-files.
893 (todos-category-number): New variable.
894 (todos-insert-category-line, todos-update-categories-display)
895 (todos-raise-category-priority): Use it.
896 (todos-add-file): Remove unused remnant code.
897
898 2012-09-21 Stephen Berman <stephen.berman@gmx.net>
899
900 Changes from 2012-05-25 (revision 110004).
901 * calendar/todos.el: Further comment revision.
902 (todos-set-item-top-priority): New command.
903 (todos-reset-global-current-todos-file):
904 Use todos-files-function instead of todos-files.
905 (todos-read-category): Add optional argument to test whether
906 caller adds new category; if so, don't prompt for new category and
907 don't restore original todos-categories list.
908 (todos-categories-mode-map): Update to renamed commands.
909 (todos-filter-items-mode-map): Add binding for new command.
910 (todos-mode): Fix typo.
911 (todos-show): If called from archive file, show corresponding
912 category in Todos file, if it exists.
913 (todos-jump-to-category): Remove code to add new category, since
914 todos-read-category can do that.
915 (todos-add-file): Remove obsolete code; visit new file in selected
916 window.
917 (todos-add-category): Simplify.
918 (todos-rename-category): Use force-mode-line-update instead of
919 setting mode-line-buffer-identification.
920 (todos-delete-category): Improve logic of prompts; use
921 todos-categories-full and check todos-ignore-archived-categories.
922 (todos-raise-category-priority, todos-lower-category-priority):
923 Rename from todos-{raise,lower}-category and adjust callers.
924 (todos-move-category, todos-merge-category):
925 Set todos-categories-full; on setting todos-categories check
926 todos-ignore-archived-categories.
927 (todos-insert-item): Let-bind use-empty-active-region and use
928 use-region-p instead of transient-mark-mode.
929 (todos-raise-item-priority): Improve implementation.
930 (todos-archive-done-item): Rename from
931 todos-archive-done-item-or-items and adjust callers; confine to
932 Todos mode.
933 (todos-unarchive-items): On setting todos-categories check
934 todos-ignore-archived-categories.
935
936 2012-09-21 Stephen Berman <stephen.berman@gmx.net>
937
938 Changes from 2012-05-23 (revision 110003).
939 * calendar/todos.el (todos-key-bindings): Remove binding of
940 deleted command.
941 (todos-menu): Remove entry of deleted command.
942 (todos-show-archive): Fix last change.
943 (todos-done-item-add-or-edit-comment): Rename from
944 todos-comment-done-item and adjust callers; prompt to edit an
945 existing comment.
946
947 2012-09-21 Stephen Berman <stephen.berman@gmx.net>
948
949 Changes from 2012-05-22 (revision 110002).
950 * calendar/todos.el (todos-set-show-current-file): Rename from
951 todos-toggle-show-current-file and adjust callers.
952 (todos-number-priorities): Rename from todos-number-prefix and
953 adjust users.
954 (todos-update-count): Rename from todos-set-count and adjust
955 callers.
956 (todos-hide-show-item-numbering): Rename from
957 todos-toggle-item-numbering and adjust callers.
958 (todos-hide-show-done-items): Rename from
959 todos-toggle-view-done-items and adjust callers.
960 (todos-show-done-only): Rename from todos-toggle-show-done-only.
961 (todos-view-archived-items): Comment out.
962 (todos-show-archive): Prompt to choose another archive file if
963 current Todos file lacks an archive; prompt to visit archive
964 anyway when current category has no archived items.
965
966 2012-09-21 Stephen Berman <stephen.berman@gmx.net>
967
968 Changes from 2012-05-21 (revision 110001).
969 * calendar/todos.el: Further comment revision and code
970 rearrangement.
971 (todos-item-end): Revert last change.
972 (todos-key-bindings, todos-menu, todos-archive-mode-map)
973 (todos-filter-items-mode-map): Use renamed commands.
974 (todos-hide-show-date-time): Rename from
975 todos-toggle-display-date-time.
976 (todos-mark-unmark-item): Rename from todos-toggle-mark-item and
977 adjust caller.
978 (todos-backward-item): Exempt special handling only from
979 todos-regexp-items-buffer instead of todos-filter-items-mode.
980 (todos-raise-item-priority): Don't allow item reprioritizing in
981 Todos filter items mode except for top priority items.
982
983 2012-09-21 Stephen Berman <stephen.berman@gmx.net>
984
985 Changes from 2012-05-19 (revision 110000).
986 * calendar/todos.el: Add and revise further doc strings and
987 comments.
988 (todos-filter-function, todos-custom-items)
989 (todos-custom-items-multifile): Remove.
990 (todos-filter-done-items): New defcustom.
991 (todos-item-end, todos-backward-item): Handle todos-filter-items-mode.
992 (todos-filter-items): Check return value of caller first; tag
993 archived items for todos-jump-to-item; delete categories sexp
994 before processing filter; check todos-filter-done-items for
995 whether to leave done items; remove custom filter; fix regexp for
996 file and category tags; don't invoke buffer fontification.
997 (powerset-recursive): Fix typo.
998 (todos-key-bindings): Remove unused bindings.
999 (todos-top-priorities-multifile, todos-diary-items-multifile)
1000 (todos-regexp-items-multifile): Use variable todos-multiple-files.
1001 (todos-jump-to-item): Fix regexp; handle archive tags; take
1002 todos-filter-done-items into account.
1003 (todos-insert-item-from-calendar): Relocate to end of file
1004 together with key-binding as addition to calendar.el.
1005
1006 2012-09-20 Stephen Berman <stephen.berman@gmx.net>
1007
1008 Changes from 2012-05-17 (revision 109999).
1009 * calendar/todos.el: Add and revise further doc strings and
1010 comments; major code rearrangement.
1011 (todos-merged-files, todos-prompt-merged-files)
1012 (todos-print-priorities, todos-tmp-buffer-name)
1013 (todos-top-priorities-widgets, todos-update-merged-files)
1014 (todos-merged-top-priorities, todos-merged-diary-items)
1015 (todos-merged-regexp-items, todos-merged-custom-items)
1016 (todos-raw-mode, todos-change-default-file)
1017 (todos-toggle-diary-inclusion, todos-toggle-item-diary-nonmarking)
1018 (todos-toggle-diary-nonmarking, todos-validate-category-name):
1019 Remove.
1020 (todos-category-string-matcher): Comment out.
1021 (todos-categories): New defgroup.
1022 (todos-initial-file, todos-filter-buffer)
1023 (todos-top-priorities-buffer, todos-categories-category-label)
1024 (todos-diary-items-buffer, todos-regexp-items-buffer)
1025 (todos-custom-items-buffer, todos-filter-files)
1026 (todos-highlight-item, todos-todo-mode-date-time-regexp):
1027 New defcustoms.
1028 (todos-diary-expired): New face.
1029 (todos-print-buffer, todos-multiple-files)
1030 (todos-multiple-files-widget, todos-key-bindings): New variables.
1031 (todos-short-file-name, todos-reevaluate-default-file-defcustom)
1032 (todos-special-buffer-name)
1033 (todos-reevaluate-filter-files-defcustom)
1034 (todos-reset-highlight-item, todos-reevaluate-defcustoms)
1035 (todos-nondiary-marker-matcher, todos-diary-nonmarking-matcher)
1036 (todos-diary-expired-matcher, todos-category-string-matcher-1)
1037 (todos-category-string-matcher-2, todos-repair-categories-sexp)
1038 (todos-validate-name, todos-multiple-files)
1039 (todos-display-categories-1, todos-update-categories-display)
1040 (todos-modes-set-3, todos-mode-external-set): New functions.
1041 (todos-set-top-priorities-in-file)
1042 (todos-set-top-priorities-in-category)
1043 (todos-top-priorities-multifile, todos-diary-items-multifile)
1044 (todos-regexp-items-multifile, todos-custom-items-multifile)
1045 (todos-convert-legacy-files, todos-jump-to-item)
1046 (todos-edit-multiline-item, todos-edit-item-date-from-calendar)
1047 (todos-edit-item-diary-inclusion)
1048 (todos-edit-category-diary-inclusion)
1049 (todos-edit-item-diary-nonmarking)
1050 (todos-edit-category-diary-nonmarking): New commands.
1051 (todos, todos-faces): Update :version.
1052 (todos-done-separator, todos-completion-ignore-case):
1053 Change default value.
1054 (todos-done-separator): Change :set function.
1055 (todos-indent-to-here): Add :validate function to :type.
1056 (todos-prefix-string, todos-mark, todos-button)
1057 (todos-sorted-column, todos-archived-only, todos-search)
1058 (todos-done, todos-done-sep): Provide full face definitions
1059 instead of inheriting.
1060 (todos-edit-buffer, todos-categories-buffer): Change from
1061 defcustom to defvar.
1062 (todos-category-beg, todos-category-done): Change from defvar to
1063 defconst.
1064 (todos-files): Check if todos-files-directory exists.
1065 (todos-default-todos-file, todos-mode-line-control, todos-print):
1066 Use todos-short-file-name.
1067 (todos-font-lock-keywords): Use todos-nondiary-marker-matcher,
1068 todos-diary-nonmarking-matcher, todos-category-string-matcher-1,
1069 todos-category-string-matcher-2, todos-diary-expired-matcher.
1070 (todos-category-select): Use todos-done-string-start, and
1071 condition search on todos-show-with-done; don't make display
1072 overlay for done items separator string if there already is one;
1073 use todos-highlight-item, require hl-line and activate
1074 hl-line-mode here in order to avoid a hang if done in todos-mode
1075 or the mode hook.
1076 (todos-update-categories-sexp): Use todos-categories-full if set,
1077 otherwise todos-categories.
1078 (todos-make-categories-list): Don't test for archive file when
1079 processing a legacy todo-mode file.
1080 (todos-check-format): Add check for todos-categories sexp.
1081 (todos-diary-item-p): Use todos-nondiary-start instead of
1082 todos-date-pattern.
1083 (todos-marked-item-p): Rename from todos-item-marked-p.
1084 (todos-read-file-name): Don't accept empty name; validate.
1085 (todos-read-category): Validate new name before prompting whether
1086 to add new category; force quit if user answers no.
1087 (todos-filter-items): Improve implementation.
1088 (todos-set-top-priorities): Rewrite as a noninteractive function
1089 using minibuffer input instead of widgets.
1090 (todos-insert-sort-button): Call todos-display-sorted with
1091 argument nil to display categories in numerical order, instead of
1092 calling todos-display-categories.
1093 (powerset-recursive): Borrow and slightly reformulate the (GDFL'd)
1094 Common Lisp powerset function at
1095 http://rosettacode.org/wiki/Power_set#Common_Lisp.
1096 (powerset-bitwise): Implement in Emacs Lisp the (GDFL'd) C
1097 powerset function at http://rosettacode.org/wiki/Power_set#C.
1098 (todos-powerset): Defalias to powerset-bitwise.
1099 (todos-mode-map): Generate from todos-key-bindings instead of
1100 listing each key definition.
1101 (todos-categories-mode-map): Add two bindings.
1102 (todos-filter-items-mode-map): Add some bindings, remove others.
1103 (todos-mode): Derive from special-mode; use todos-modes-set-3; add
1104 function setting todos-done-separator to
1105 window-configuration-change-hook.
1106 (todos-unload-hook): Remove function setting todos-done-separator
1107 from window-configuration-change-hook.
1108 (todos-archive-mode): Derive from todos-mode; use todos-modes-set-3.
1109 (todos-edit-mode): Derive from text-mode; use todos-mode-external-set.
1110 (todos-categories-mode): Derive from special-mode; use
1111 todos-mode-external-set.
1112 (todos-filter-items-mode): Derive from special-mode.
1113 (todos-quit): Save archive file if it hasn't yet been saved.
1114 (todos-display-categories): Delegate all functionality to
1115 todos-display-categories-1 and todos-update-categories-display.
1116 (todos-toggle-view-done-items): Improve implementation.
1117 (todos-highlight-item): Require hl-line.
1118 (todos-toggle-display-date-time): Remove argument and make it
1119 apply only to whole file.
1120 (todos-top-priorities, todos-diary-items, todos-regexp-items)
1121 (todos-custom-items): Use todos-special-buffer-name.
1122 (todos-add-file): Use todos-short-file-name and
1123 todos-reevaluate-defcustoms; remove validation, since it's now
1124 done in todos-read-file-name.
1125 (todos-add-category): Also update todos-categories-full if non-nil.
1126 (todos-delete-category): Delete file after confirmation if only
1127 category is deleted.
1128 (todos-move-category): Use todos-short-file-name and
1129 todos-reevaluate-defcustoms.
1130 (todos-insert-item): Fix getting date from the calendar and
1131 insertion of time string.
1132 (todos-set-date-from-calendar): Enter calendar buffer, suppressing
1133 display of diary entries.
1134 (todos-edit-multiline): Add optional argument to restrict editing
1135 buffer to current item, otherwise make entire buffer (i.e. whole
1136 file) editable.
1137 (todos-edit-quit): When whole file is editable, check file format
1138 validity before killing buffer, and if valid, recalculate
1139 categories sexp to be safe.
1140 (todos-edit-item-header): Allow choosing date from calendar.
1141 (todos-item-done): Handle marked items.
1142
1143 2012-09-19 Stephen Berman <stephen.berman@gmx.net>
1144
1145 Changes from 2011-12-03 (revision 109998).
1146 * calendar/todos.el (todos-item-start): Restore commented out code
1147 to prevent wrongly moving point in widened buffer.
1148
1149 2012-09-19 Stephen Berman <stephen.berman@gmx.net>
1150
1151 Changes from 2011-12-02 (revision 109997).
1152 * calendar/todos.el: Remove old commentary from todo-mode.el; add
1153 and revise further doc strings and comments; require cl.el at
1154 compile time for remove-duplicates; use function powerset from
1155 http://rosettacode.org/wiki/Power_set#Common_Lisp (GFDL); further
1156 code rearrangement. Add adapted version of diary-goto-entry as comment.
1157 (todos-file-top, todos-archived-categories-buffer)
1158 (todos-save-top-priorities-too, todos-toggle-item-diary-inclusion)
1159 (todos-save-top-priorities, todos-reset-separator)
1160 (todos-switch-todos-file, todos-item-string-start, todos-counts)
1161 (todos-string-count-lines, todos-string-multiline-p)
1162 (todos-display-categories-alphabetically): Remove.
1163 (todos-insert-item-ask-date, todos-insert-item-ask-date-time)
1164 (todos-insert-item-ask-date-time-for-diary)
1165 (todos-insert-item-ask-date-time-for-diary-here)
1166 (todos-insert-item-ask-date-time-here)
1167 (todos-insert-item-ask-date-maybe-notime)
1168 (todos-insert-item-ask-date-maybe-notime-for-diary)
1169 (todos-insert-item-ask-date-maybe-notime-for-diary-here)
1170 (todos-insert-item-ask-date-maybe-notime-here)
1171 (todos-insert-item-ask-date-for-diary)
1172 (todos-insert-item-ask-date-for-diary-here)
1173 (todos-insert-item-ask-date-here, todos-insert-item-ask-dayname)
1174 (todos-insert-item-ask-dayname-time)
1175 (todos-insert-item-ask-dayname-time-for-diary)
1176 (todos-insert-item-ask-dayname-time-for-diary-here)
1177 (todos-insert-item-ask-dayname-time-here)
1178 (todos-insert-item-ask-dayname-maybe-notime)
1179 (todos-insert-item-ask-dayname-maybe-notime-for-diary)
1180 (todos-insert-item-ask-dayname-maybe-notime-for-diary-here)
1181 (todos-insert-item-ask-dayname-maybe-notime-here)
1182 (todos-insert-item-ask-dayname-for-diary)
1183 (todos-insert-item-ask-dayname-for-diary-here)
1184 (todos-insert-item-ask-dayname-here, todos-insert-item-ask-time)
1185 (todos-insert-item-ask-time-for-diary)
1186 (todos-insert-item-ask-time-for-diary-here)
1187 (todos-insert-item-ask-time-here)
1188 (todos-insert-item-maybe-notime)
1189 (todos-insert-item-maybe-notime-for-diary)
1190 (todos-insert-item-maybe-notime-for-diary-here)
1191 (todos-insert-item-maybe-notime-here)
1192 (todos-insert-item-for-diary, todos-insert-item-for-diary-here)
1193 (todos-insert-item-here): Remove; all of these are now generated
1194 on loading (some with the same name, most with other names.)
1195 (todos-item-counts, todos-display-categories-alphabetically)
1196 (todos-display-categories-sorted-by-todo)
1197 (todos-display-categories-sorted-by-diary)
1198 (todos-display-categories-sorted-by-done)
1199 (todos-display-categories-sorted-by-archived): Comment out.
1200 (todos-comment-string, todos-mode-line-function)
1201 (todos-filter-function, todos-priorities-rules)
1202 (todos-visit-files-commands, todos-categories-totals-label)
1203 (todos-use-only-highlighted-region, todos-diary-nonmarking):
1204 New defcustoms.
1205 (todos-mark, todos-comment): New faces.
1206 (todos-comment-face): Corresponding new variable.
1207 (todos-categories-full, todos-global-current-todos-file)
1208 (todos-first-visit, todos-insertion-commands-args-genlist)
1209 (todos-insertion-commands-args, todos-insertion-commands-names)
1210 (todos-insertion-commands, todos-insertion-commands-arg-key-list)
1211 (todos-top-priorities-widgets, todos-date-from-calendar)
1212 (todos-item-mark, todos-categories-with-marks): New variables.
1213 (todos-mode-line-control, todos-reset-global-current-todos-file)
1214 (todos-gen-arglists, todos-insertion-command-name)
1215 (todos-insertion-key-bindings, todos-unload-hook)
1216 (todos-filter-items, todos-set-date-from-calendar)
1217 (todos-comment-string-matcher, todos-after-find-file)
1218 (todos-reset-nondiary-marker, todos-reset-done-string)
1219 (todos-reset-comment-string, todos-show-current-file)
1220 (todos-item-marked-p, todos-total-item-counts): New functions.
1221 (todos-define-insertion-command): New macro.
1222 (todos-toggle-mark-item, todos-mark-category)
1223 (todos-unmark-category, todos-set-top-priorities)
1224 (todos-merged-diary-items, todos-regexp-items)
1225 (todos-merged-regexp-items, todos-custom-items)
1226 (todos-merged-custom-items, todos-comment-done-item)
1227 (todos-archive-category-done-items, todos-unarchive-items)
1228 (todos-print-to-file): New commands.
1229 (todos-done-separator): Change :set function.
1230 (todos-done-string): Uncomment :initialize and :set functions.
1231 (todos-files): Use file-truename.
1232 (todos-show-current-file): Rename from
1233 todos-auto-switch-todos-file and change :set function accordingly.
1234 (todos-font-lock-keywords): Use todos-comment-string-matcher;
1235 change names of other matcher functions to new *-matcher.
1236 (todos-category-number): Change initial value.
1237 (todos-insertion-map): Use todos-insertion-key-bindings to
1238 generate key definitions.
1239 (todos-mode-map): Don't suppress digit keys, so they can supply
1240 prefix arguments; add new and change some existing bindings.
1241 (todos-archive-mode-map): Change a key binding.
1242 (todos-categories-mode-map): Comment out a key binding.
1243 (todos-filter-items-mode-map): Rename from
1244 todos-top-priorities-mode-map.
1245 (todos-mode): Make todos-current-todos-file,
1246 todos-categories-full, todos-categories, todos-first-visit,
1247 todos-category-number, todos-show-done-only,
1248 todos-categories-with-marks local variables and set them; add
1249 todos-show-current-file to pre-command-hook, todos-after-find-file
1250 to post-command-hook and todos-reset-global-current-todos-file to
1251 kill-buffer-hook.
1252 (todos-archive-mode): Make todos-current-todos-file,
1253 todos-categories and todos-category-number local variables and set
1254 them; add todos-after-find-file to post-command-hook.
1255 (todos-raw-mode): New derived major mode.
1256 (todos-categories-mode): Don't set font-lock-defaults and
1257 buffer-read-only; make todos-current-todos-file and
1258 todos-categories local variables and set them.
1259 (todos-filter-items-mode): Rename from todos-top-priorities-mode-map.
1260 (todos-quit): Don't reset todos-categories on quitting
1261 todos-categories-mode; handle quitting todos-filter-items-mode.
1262 (todos-show): Simplify; when visiting an archive file switch to
1263 corresponding Todos file; use todos-first-visit.
1264 (todos-view-archived-items): Simplify; call todos-category-number.
1265 (todos-show-archive): Rename from todos-switch-to-archive and
1266 adjust callers; simplify.
1267 (todos-toggle-display-date-time): Add optional argument to toggle
1268 display in entire file.
1269 (todos-top-priorities): Use todos-filter-items, which now contains
1270 the previous core of this command.
1271 (todos-merged-top-priorities, todos-diary-items):
1272 Use todos-filter-items.
1273 (todos-forward-category): Add optional argument to go to the
1274 previous category.
1275 (todos-backward-category): Use todos-forward-category.
1276 (todos-jump-to-category): Refine implementation.
1277 (todos-forward-item, todos-backward-item): Fix movement from todo
1278 to done item and vice versa.
1279 (todos-add-file): Remove argument and simplify.
1280 (todos-rename-category): Use todos-current-todos-file and
1281 todos-mode-line-function; set todos-categories with
1282 todos-set-categories.
1283 (todos-delete-category): Ask what to do if category has archived items.
1284 (todos-raise-category): Ensure modified todos-categories is added
1285 to file's categories sexp.
1286 (todos-move-category): Improve implementation, especially handling
1287 of archived categories.
1288 (todos-merge-category): Tweak; set item counts.
1289 (todos-insert-item): Improve handling of various argument values;
1290 add new argument values to control marking of diary items and to
1291 use region for item body.
1292 (todos-insert-item-from-calendar): Use todos-global-current-todos-file.
1293 (todos-delete-item, todos-edit-item-header): Handle marked items.
1294 (todos-edit-item): Incorporate functionality of removed
1295 todos-string-multiline-p.
1296 (todos-edit-multiline): Use set-window-buffer instead of
1297 switch-to-buffer.
1298 (todos-edit-quit): Don't save on quitting; use todos-show instead
1299 of todos-category-select.
1300 (todos-raise-item-priority): Add argument to lower priority;
1301 improve handling of top priority items in todos-filter-items-mode;
1302 restore marks.
1303 (todos-lower-item-priority): Use todos-raise-item-priority.
1304 (todos-set-item-priority): Increment maximum number if item is new.
1305 (todos-move-item): Handle marked items; delay changing category
1306 moved from till after movement to avoid restoring if user cancels
1307 before insertion.
1308 (todos-item-done): Add optional argument to insert comment; fix
1309 item counts and update sexp.
1310 (todos-item-undo): Fix item counts and update.
1311 (todos-archive-done-item-or-items): Rename from
1312 todos-archive-done-items; add optional argument to archive all
1313 items in category; handle marked items.
1314 (todos-unarchive-category): Use todos-unarchive-items.
1315 (todos-toggle-diary-inclusion): Incorporate functionality of
1316 removed todos-toggle-item-diary-inclusion; handle marked items.
1317 (todos-print): Add optional argument to print to file.
1318 (todos-done-string-start): Don't use todos-nondiary-start.
1319 (todos-date-string-matcher, todos-time-string-matcher)
1320 (todos-done-string-matcher, todos-category-string-matcher): Rename
1321 from *-match and adjust callers.
1322 (todos-wrap-and-indent): Use set instead of setq for local variables.
1323 (todos-prefix-overlays): Improve overlay handling.
1324 (todos-reset-categories): Fix and complete implementation.
1325 (todos-toggle-show-current-file): Rename from
1326 todos-toggle-switch-todos-file-noninteractively.
1327 (todos-category-select): Use todos-mode-line-function.
1328 (todos-item-start): Comment out code used by removed function.
1329 (todos-remove-item): Handle presence of both prefix/number and
1330 mark overlays.
1331 (todos-get-count): Simplify.
1332 (todos-set-count): Change argument list and adjust callers; simplify.
1333 (todos-set-categories): Handle new archive files; use
1334 todos-categories-full and todos-ignore-archived-categories.
1335 (todos-truncate-categories-list): Use todos-categories-full.
1336 (todos-update-categories-sexp): Use kill-region instead of
1337 kill-line; use todos-categories-full.
1338 (todos-read-file-name): Add argument to require existing file and
1339 adjust callers; use file-truename.
1340 (todos-read-category): Remove argument to require existing
1341 category and delegate it to completing-read in function body.
1342 (todos-validate-category-name): Make empty string prompt only for
1343 initial category name.
1344 (todos-read-date): Use = instead of eq for testing if month = 13,
1345 and if it is, set monthname to *.
1346 (todos-display-categories): Use todos-global-current-todos-file;
1347 use set-window-buffer instead of switch-to-buffer; add a line
1348 showing item count totals.
1349 (todos-padded-string): Use the longest of category name or label.
1350 (todos-descending-counts): Rename from
1351 todos-descending-counts-store and adjust users.
1352 (todos-insert-category-line): Adjust format; use mapconcat; kill
1353 buffer after jumping to category.
1354
1355 2012-09-18 Stephen Berman <stephen.berman@gmx.net>
1356
1357 Changes from 2011-05-16 (revision 109996).
1358 * calendar/todos.el Add and revise various doc strings, remove
1359 further commented out code; add further comments; further code
1360 rearrangement.
1361 (todos-file-do, todos-archive-file, todos-mode-hook)
1362 (todos-edit-mode-hook, todos-exclusion-start, todos-exclusion-end)
1363 (todos-view-archive, todos-search-string)
1364 (todos-jump-to-category-noninteractively, todos-initial-setup):
1365 Remove.
1366 (todos-files): Remove this defcustom.
1367 (todos-initial-category, todos-display-categories-first)
1368 (todos-auto-switch-todos-file, todos-default-todos-file)
1369 (todos-categories-category-label, todos-categories-todo-label)
1370 (todos-categories-diary-label, todos-categories-done-label)
1371 (todos-categories-archived-label)
1372 (todos-categories-number-separator, todos-categories-align)
1373 (todos-ignore-archived-categories, todos-nondiary-marker):
1374 New defcustoms.
1375 (todos-prefix, todos-done-separator, todos-file-top)
1376 (todos-categories-buffer, todos-archived-categories-buffer)
1377 (todos-edit-buffer, todos-always-add-time-string, todos-button):
1378 Change default value.
1379 (todos-done-string): Add todos-reset-done-string as :set function,
1380 but keep this commented out.
1381 (todos-files, todos-archives, todos-insertion-map)
1382 (todos-category-done, todos-nondiary-start, todos-nondiary-end)
1383 (todos-show-done-only, todos-date-string-start)
1384 (todos-done-string-start): New variables.
1385 (todos-files-directory, todos-files-function, todos-merged-files)
1386 (todos-prompt-merged-files, todos-files, todos-modes-set-1)
1387 (todos-modes-set-2, todos-reset-done-string, todos-reset-categories)
1388 (todos-toggle-switch-todos-file-noninteractively)
1389 (todos-switch-todos-file, todos-counts, todos-get-count)
1390 (todos-set-count, todos-set-categories)
1391 (todos-truncate-categories-list, todos-update-categories-sexp)
1392 (todos-read-file-name, todos-sort, todos-display-sorted)
1393 (todos-label-to-key, todos-insert-sort-button): New functions.
1394 (todos-display-categories-sorted-by-todo)
1395 (todos-display-categories-sorted-by-diary)
1396 (todos-display-categories-sorted-by-done)
1397 (todos-display-categories-sorted-by-archived)
1398 (todos-update-merged-files, todos-switch-to-archive)
1399 (todos-choose-archive, todos-merged-top-priorities)
1400 (todos-jump-to-category-other-file, todos-clear-matches)
1401 (todos-add-file, todos-change-default-file, todos-move-category)
1402 (todos-merge-category, todos-merge-categories)
1403 (todos-edit-item-time, todos-move-item-to-file)
1404 (todos-unarchive-category, todos-toggle-item-diary-nonmarking)
1405 (todos-toggle-diary-nonmarking): New commands.
1406 (todos-toggle-show-done-only): New command replacing todos-view-archive.
1407 (todos-faces): New defgroup; use in all face definitions.
1408 (todos-sorted-column, todos-archived-only, todos-search): New faces.
1409 (todos-font-lock-keywords): Use subexpression 1 with matcher
1410 todos-category-string-match.
1411 (todos-mode-map, todos-archive-mode-map, todos-edit-mode-map)
1412 (todos-categories-mode-map): Add new key bindings; change some
1413 existing bindings.
1414 (todos-top-priorities-mode-map): New keymap.
1415 (todos-menu): Add submenues and new entries.
1416 (auto-mode-alist): Add extension of Todos and Todos archive files.
1417 (todos-mode, todos-archive-mode): Make derived mode; use
1418 todos-modes-set-1, todos-modes-set-2, todos-auto-switch-todos-file
1419 and todos-switch-todos-file; make todos-show-done-only local
1420 variable.
1421 (todos-edit-mode): Make derived mode; use todos-modes-set-1.
1422 (todos-categories-mode): Make derived mode.
1423 (todos-top-priorities-mode): New derived major mode.
1424 (todos-save): Remove unused code.
1425 (todos-quit): Handle todos-categories-mode; save archive buffer.
1426 (todos-show): Add optional argument to prompt for a Todos file; if
1427 called interactively or with prefix arg or from an archive, don't
1428 make a no-op but reset todos-current-todos-file, todos-categories
1429 and todos-category-number; use todos-read-file-name,
1430 todos-display-categories-first, todos-ignore-archived-categories.
1431 (todos-display-categories): Change argument name; refactor code
1432 for inserting table labels and lines, using
1433 todos-ignore-archived-categories, todos-sort,
1434 todos-categories-number-separator, todos-insert-sort-button,
1435 todos-categories-*-labels, and todos-insert-category-line.
1436 (todos-display-categories-alphabetically): Use todos-display-sorted.
1437 (todos-toggle-view-done-items): Use todos-done-string-start and
1438 todos-get-count.
1439 (todos-toggle-display-date-time): Use todos-done-string-start.
1440 (todos-top-priorities): Remove autoload cookie; partially rewrite:
1441 new argument list; allow combining top priorities of multiple
1442 Todos files; change display to include category (and file) name as
1443 part of item header; use todos-top-priorities-mode.
1444 (todos-diary-items): Reimplement using only todos-top-priorities.
1445 (todos-forward-category, todos-backward-category): Adjust to
1446 1-based numbering of categories; move point to top of category.
1447 (todos-jump-to-category): Rewrite, adding optional arguments to
1448 provide a category in non-interactive uses and to prompt for which
1449 Todos file to jump to.
1450 (todos-search): Reimplement; highlight each match as found, say
1451 how many matches remain and prompt whether to go to next one; at
1452 end of search prompt whether to remove highlighting.
1453 (todos-add-category): Remove autoload cookie; assign new category
1454 the highest category number; associate zero-initialized vector of
1455 item counts, instead of property list, with new category; use
1456 todos-validate-category-name and todos-update-categories-sexp.
1457 (todos-rename-category): Use todos-validate-category-name and
1458 todos-update-categories-sexp; take archive files into account.
1459 (todos-delete-category): Use todos-get-count and
1460 todos-update-categories-sexp, let-bind variable that were
1461 mistakenly global; use delete-region instead of kill-region;
1462 adjust to 1-based numbering of categories; move point to top of
1463 category.
1464 (todos-raise-category): Handle item count vectors; use
1465 todos-insert-category-line and todos-update-categories-sexp.
1466 (todos-insert-item): Use nil time-string argument to omit time
1467 string; use todos-nondiary-start and todos-nondiary-end and
1468 todos-update-categories-sexp; if category named to insert into
1469 does not exist, add it; take new diary items into account.
1470 (todos-insert-item-ask-date, todos-insert-item-ask-date-time)
1471 (todos-insert-item-ask-date-time-for-diary)
1472 (todos-insert-item-ask-date-time-for-diary-here)
1473 (todos-insert-item-ask-date-time-here)
1474 (todos-insert-item-ask-date-maybe-notime)
1475 (todos-insert-item-ask-date-maybe-notime-for-diary)
1476 (todos-insert-item-ask-date-maybe-notime-for-diary-here)
1477 (todos-insert-item-ask-date-maybe-notime-here)
1478 (todos-insert-item-ask-date-for-diary)
1479 (todos-insert-item-ask-date-for-diary-here)
1480 (todos-insert-item-ask-date-here, todos-insert-item-ask-dayname)
1481 (todos-insert-item-ask-dayname-time)
1482 (todos-insert-item-ask-dayname-time-for-diary)
1483 (todos-insert-item-ask-dayname-time-for-diary-here)
1484 (todos-insert-item-ask-dayname-time-here)
1485 (todos-insert-item-ask-dayname-maybe-notime)
1486 (todos-insert-item-ask-dayname-maybe-notime-for-diary)
1487 (todos-insert-item-ask-dayname-maybe-notime-for-diary-here)
1488 (todos-insert-item-ask-dayname-maybe-notime-here)
1489 (todos-insert-item-ask-dayname-for-diary)
1490 (todos-insert-item-ask-dayname-for-diary-here)
1491 (todos-insert-item-ask-dayname-here, todos-insert-item-ask-time)
1492 (todos-insert-item-ask-time-for-diary)
1493 (todos-insert-item-ask-time-for-diary-here)
1494 (todos-insert-item-ask-time-here)
1495 (todos-insert-item-maybe-notime)
1496 (todos-insert-item-maybe-notime-for-diary)
1497 (todos-insert-item-maybe-notime-for-diary-here)
1498 (todos-insert-item-maybe-notime-here)
1499 (todos-insert-item-for-diary, todos-insert-item-for-diary-here):
1500 New insertion commands.
1501 (todos-insert-item-from-calendar): Use todos-current-todos-file.
1502 (todos-delete-item): Handle diary items;
1503 use todos-update-categories-sexp.
1504 (todos-edit-item): Check if point is with item string;
1505 use read-string instead of read-from-minibuffer;
1506 use todos-date-string-start; after editing put point at start of
1507 item text.
1508 (todos-edit-multiline): Narrow to item before invoking
1509 todos-edit-mode; show key binding of todos-edit-quit in a message.
1510 (todos-edit-quit): Use todos-save; kill buffer.
1511 (todos-edit-item-header): Add optional argument to prompt for
1512 editing only date string or only time string;
1513 use todos-date-string-start.
1514 (todos-edit-item-date, todos-edit-item-date-is-today)
1515 (todos-raise-item-priority, todos-lower-item-priority): Rename
1516 from todos-{raise, lower}-item and make them DTRT in
1517 todos-top-priorities-mode.
1518 (todos-set-item-priority): Make interactive; use todos-get-count
1519 and todos-insert-with-overlays; interactively, just relocate the
1520 item within its category.
1521 (todos-move-item): Add optional argument to prompt for a category
1522 in another Todos file; handle diary items; fix restoration after
1523 cancelling before inserting.
1524 (todos-item-done): Handle diary items; simplify handling of
1525 insertion in done items section.
1526 (todos-item-undo): Handle diary items.
1527 (todos-archive-done-items): Adjust to new handling of archive
1528 files (in parallel with Todos files); handle diary items; use
1529 todos-done-string-start.
1530 (todos-toggle-item-diary-inclusion): Use todos-nondiary-start,
1531 todos-nondiary-end and todos-item-counts.
1532 (todos-toggle-diary-inclusion): Use todos-category-done instead of
1533 todos-category-end.
1534 (todos-print): Remove autoload cookie; rewrite to make overlays,
1535 line wrapping and wrap prefixes printable.
1536 (todos-date-pattern): Make parenthesized groups shy.
1537 (todos-date-string-match): Use todos-date-string-start; make
1538 todos-date-pattern an explicitly numbered group.
1539 (todos-time-string-match): Use todos-date-string-start.
1540 (todos-done-string-match): Use todos-done-string-start.
1541 (todos-category-string-match): Rewrite to match new category and
1542 category+filename patterns in todos-top-priorities-mode.
1543 (todos-prefix-overlays): Use todos-done-string-start and
1544 todos-category-done.
1545 (todos-reset-prefix): Handle archive files; restore point after
1546 changing prefix.
1547 (todos-reset-separator): Handle archive files.
1548 (todos-category-number): Make category number one more than its
1549 list index.
1550 (todos-current-category): Adjust to 1-based numbering of categories.
1551 (todos-category-select): Simplify handling of done items and done
1552 separator string overlay.
1553 (todos-item-start): Use todos-date-string-start and
1554 todos-done-string-start.
1555 (todos-item-start, todos-item-end): Fix wrong parenthesizing.
1556 (todos-item-string): Restore point after getting item bounds; use
1557 buffer-substring-no-properties.
1558 (todos-done-item-p): Use todos-done-string-start.
1559 (todos-make-categories-list): Add optional argument to force
1560 looping through file to get categories and their item counts,
1561 otherwise set todos-categories from sexp in first line; use
1562 vectors of item counts instead of plists; count diary items.
1563 (todos-item-counts): Use todos-counts, todos-set-counts,
1564 todos-get-counts, and todos-update-categories-sexp instead of
1565 getting and setting properties; handle diary items.
1566 (todos-read-category): Add argument to set prompt; don't offer
1567 default category.
1568 (todos-validate-category-name): Rename from
1569 todos-check-category-name; take into account whether there are
1570 already categories or not.
1571 (todos-read-date): Accept `*' as an unspecified month, day, or year.
1572 (todos-padded-string): Accommodate new structure of
1573 todos-categories as alists; use todos-categories-align.
1574 (todos-descending-counts-store): New variable.
1575 (todos-insert-category-line): Rename from
1576 todos-insert-category-name and reimplement using labels and
1577 todos-get-counts instead of properties; use
1578 todos-ignore-archived-categories; highlight sorted column.
1579
1580 2012-09-14 Stephen Berman <stephen.berman@gmx.net>
1581
1582 Changes from 2010-07-09 (revision 109995).
1583 * calendar/todos.el Remove lots of commented out code; add various
1584 comments; further code rearrangement.
1585 (todos-insert-item-here-ask-date-time)
1586 (todos-insert-item-ask-date-time)
1587 (todos-insert-item-ask-dayname-time)
1588 (todos-insert-item-for-diary)
1589 (todos-insert-item-for-diary-ask-date-time)
1590 (todos-make-categories-alist, todos-categories-alist): Remove.
1591 (todos-categories-list): Comment out.
1592 (todos-make-categories-list): New function replacing
1593 todos-make-categories-alist, using category plists to get item
1594 counts and taking archive into account.
1595 (todos-current-todos-file): New variable.
1596 (todos-mode-map): Update key bindings.
1597 (todos-save): Add as comment code to make sure todos-categories
1598 sexp is current on saving.
1599 (todos-quit): Call todos-show on quitting Todos archive buffer.
1600 (todos-show): If todos-current-todos-file is not set to Todos
1601 file, set it as a new file; set todos-categories from
1602 todos-make-categories-alist.
1603 (todos-display-categories): Use a different display format for
1604 archive file; put point initially on the first button.
1605 (todos-toggle-view-done-items): Check the category's `done'
1606 property to determine if there are done items.
1607 (todos-view-archive): Set todos-current-todos-file to the archive
1608 file; jump from the Todos file to the same category in the
1609 archive, if it exists, else jump to the first category; use
1610 message instead of error.
1611 (todos-add-category): Intern a special symbol for the new category
1612 and set its property list to holds counts of the numbers of todo,
1613 done and archived items in the category; assign the new category
1614 the current highest category number.
1615 (todos-rename-category): Don't use todos-categories-alist.
1616 (todos-delete-category): Check the category's `todo' and `done'
1617 properties to determine if it is empty; ensure that the end of the
1618 last category is found; after deleting the category, empty its
1619 plist and unintern its special symbol.
1620 (todos-insert-item-here): Fix argument list of todos-insert-item.
1621 (todos-delete-item, todos-raise-item, todos-lower-item):
1622 Use message instead of error.
1623 (todos-move-item): If the category to be moved to does not exist,
1624 add it as a new category.
1625 (todos-item-done, todos-reset-separator):
1626 Use todos-category-select instead of todos-show.
1627 (todos-archive-done-items): Make buffer writeable; conditionalize
1628 search for end of category; save after adding to archive in case
1629 the file is new, so it can be found.
1630 (todos-category-select): Wrap search in if instead of or+and;
1631 don't hide done items in an archive.
1632 (todos-set-item-priority): Check the category's `todo'
1633 property to determine if there are not done todo items.
1634 (todos-jump-to-category-noninteractively): Just switch to buffer
1635 visiting todos-current-todos-file, since this can be either a
1636 Todos file or an archive.
1637 (todos-item-counts): Use category's plist instead of an alist.
1638 (todos-longest-category-name-length): Argument is now a list of
1639 category names, not an alist, so just test each element, not each
1640 element's the car.
1641 (todos-padded-string): Use todos-categories instead of
1642 todos-categories-alist.
1643 (todos-insert-category-name): Use category plist to get item
1644 counts; take archived items into account.
1645
1646 2012-09-13 Stephen Berman <stephen.berman@gmx.net>
1647
1648 Changes from 2010-06-18 (revision 109994).
1649 * calendar/todos.el: Numerous spelling and comment fixes, doc
1650 string fixes to conform with checkdoc, further rearrangement of
1651 definitions, etc.
1652 (todos-previous-line, todos-previous-answer)
1653 (todos-insert-item-ask-date, todos-change-date)
1654 (todos-date-nodayname-pattern, todos-dayname-date-pattern)
1655 (todos-count-items-in-category, todos-count-all-items): Remove.
1656 (todos-update-numbered-prefix, todos-item-start-overlays)
1657 (todos-add-item-non-interactively): Comment out, also in uses.
1658 (todos-done-separator): Change default value.
1659 (todos-always-add-time-string): Rename from todos-add-time-string
1660 and adjust uses.
1661 (todos-read-category): Rename from todos-completing-read and
1662 adjust callers; use todos-current-category.
1663 (todos-make-categories-alist): Rename from function
1664 todos-categories-alist.
1665 (todos-categories-alist): New variable.
1666 (todos-indent-to-here): New defcustom.
1667 (todos-button): New face.
1668 (todos-display-categories-alphabetically, todos-raise-category)
1669 (todos-lower-category, todos-insert-item-for-diary-ask-date-time)
1670 (todos-insert-item-here-ask-date-time)
1671 (todos-insert-item-ask-date-time)
1672 (todos-insert-item-ask-dayname-time): New commands.
1673 (todos-edit-item-header): New command replacing todos-change-date.
1674 (todos-category-number, todos-indent, todos-item-counts)
1675 (todos-check-category-name, todos-read-date, todos-read-dayname)
1676 (todos-read-time, todos-padded-string)
1677 (todos-insert-category-name): New functions.
1678 (todos-set-item-priority): New function replacing
1679 todos-add-item-non-interactively.
1680 (todos-mode-map): Remap newline to newline-and-indent.
1681 (todos-edit-mode-map): Make sparse keymap; remap newline to
1682 newline-and-indent.
1683 (todos-categories-mode-map): New keymap.
1684 (todos-mode, todos-edit-mode): Make indent-line-function local
1685 variable and set to todos-indent.
1686 (todos-categories-mode): New major mode.
1687 (todos-display-categories): List categories initially in their
1688 numerical order; add optional argument to switch to alphabetical
1689 listing.
1690 (todos-toggle-view-done-items): Simplify implementation.
1691 (todos-toggle-display-date-time): Fix regexp search string.
1692 (todos-backward-item, todos-forward-item): Use variable
1693 todos-item-start.
1694 (todos-add-category): Use todos-check-category-name and
1695 todos-categories-alist.
1696 (todos-rename-category): Use todos-current-category,
1697 todos-check-category-name and todos-categories-alist.
1698 (todos-delete-category): Use todos-check-category-name and
1699 todos-categories-alist and take done items into account.
1700 (todos-insert-item): Use separate arguments to handle insertion of
1701 date/dayname and time strings, add new argument to mark item for
1702 diary inclusion, use new todos-read-* functions,
1703 todos-set-item-priority and todos-item-counts.
1704 (todos-insert-item-here, todos-insert-item-for-diary)
1705 (todos-insert-item-from-calendar): Adapt to new version of
1706 todos-insert-item.
1707 (todos-delete-item, todos-item-done): Use todos-item-counts.
1708 (todos-edit-item): Indent newlines inserted by C-q C-j if nonspace
1709 char follows.
1710 (todos-lower-item): Ensure only not-done items can be lowered.
1711 (todos-move-item): Use todos-current-category, todos-read-category
1712 and todos-item-counts.
1713 (todos-archive-done-items): Use todos-current-category and
1714 todos-item-counts; fix regexp search string.
1715 (todos-item-undo): Use todos-current-category,
1716 todos-set-item-priority, todos-insert-with-overlays and
1717 todos-item-counts; restore if user quits before inserting undone
1718 item.
1719 (todos-date-pattern): Rewrite without using
1720 todos-date-nodayname-pattern and todos-dayname-date-pattern.
1721 (todos-date-string-match): Do not make todos-date-pattern an
1722 unnumbered group.
1723 (todos-time-string-match): Make todos-date-pattern a shy group.
1724 (todos-wrap-and-indent): Use todos-indent-to-here.
1725 (todos-reset-prefix): Revert to using todos-show instead of
1726 todos-category-select.
1727 (todos-prefix-overlays): Fix numbering of done items and updating
1728 of prefix.
1729 (todos-category-select): Use todos-current-category; fix display
1730 of separator string; don't move point to top of category.
1731 (todos-jump-to-category-noninteractively): Use todos-category-number.
1732 (todos-insert-with-overlays): Use todos-item-start unconditionally.
1733 (todos-item-start): New variable.
1734 (todos-item-start): Use it to define this function.
1735 (todos-item-end): Adjust if item is last unfinished one before
1736 displayed done items.
1737 (todos-remove-item): Use todos-item-start and todos-item-end
1738 instead of todos-forward-item and todos-backward-item.
1739 (todos-longest-category-name-length): Add argument for list of
1740 categories.
1741
1742 2012-09-13 Stephen Berman <stephen.berman@gmx.net>
1743
1744 Changes from 2010-05-25 (revision 109993).
1745 * calendar/todos.el: Comment out calendar require, since diary-lib
1746 requires calendar. Rearrange file to group definitions according
1747 to their use (types of commands, internal functions, etc.)
1748 (todos-file-done, todos-insert-threshold, todos-remove-separator)
1749 (todos-date-string, todos-time-string, todos-check-overlay)
1750 (todos-show-paren-hack, todos-file-item, todos-more-important-p):
1751 Comment out.
1752 (todos-current-date, todos-item-end-overlays)
1753 (todos-list-categories): Remove.
1754 (todos-item-end): Remove (the variable, not the function).
1755 (todos-prefix-overlays): Rename from todos-item-overlays and adjust
1756 callers.
1757 (todos-done-separator, todos-done-string, todos-show-with-done)
1758 (todos-files, todos-archive-file, todos-categories-buffer)
1759 (todos-archived-categories-buffer, todos-wrap-lines)
1760 (todos-line-wrapping-function): New defcustoms.
1761 (todos-done, todos-done-sep): New faces.
1762 (todos-done-face, todos-done-sep-face): Corresponding new variables.
1763 (todos-search-string, todos-date-nodayname-pattern)
1764 (todos-dayname-date-pattern, todos-date-pattern): New variables.
1765 (todos-done-string-match, todos-category-string-match)
1766 (todos-check-format, todos-wrap-and-indent, todos-reset-separator)
1767 (todos-current-category, todos-count-items-in-category)
1768 (todos-done-item-p, todos-categories-alist, todos-count-all-items)
1769 (todos-longest-category-name-length): New functions.
1770 (todos-categories-list): New buffer-specific function replacing
1771 todos-list-categories.
1772 (todos-toggle-item-numbering, todos-toggle-view-done-items)
1773 (todos-search, todos-view-archive, todos-diary-items)
1774 (todos-toggle-display-date-time, todos-insert-item-no-time)
1775 (todos-insert-item-ask-date, todos-insert-item-for-diary)
1776 (todos-insert-item-from-calendar, todos-edit-quit)
1777 (todos-change-date, todos-item-done, todos-archive-done-items)
1778 (todos-item-undo): New commands.
1779 (todos-archive-mode): New major mode.
1780 (todos-archive-mode-map, todos-edit-mode-map): New keymaps.
1781 (todos-category-beg): Change value.
1782 (todos-number-prefix): Change default value.
1783 (todos-edit-buffer): Change from defvar to defcustom.
1784 (todos-font-lock-keywords): Use todos-done-string-match and
1785 todos-category-string-match.
1786 (todos-backward-item, todos-forward-item): Use todos-done-string
1787 and todos-date-pattern.
1788 (todos-display-categories): Reimplement using buttons from
1789 button.el instead of widgets.
1790 (todos-top-priorities): Use with-current-buffer; take done items
1791 into account; ensure buffers gets fontified.
1792 (todos-add-category): Ensure new category does not begin with
1793 empty lines.
1794 (todos-jump-to-category): Use todos-category-select instead of
1795 todos-show.
1796 (todos-rename-category): Prompt for new name in body instead of in
1797 interactive spec.
1798 (todos-insert-item): Don't insert in done items section of
1799 category. Add two optional arguments to control insertion: (i) to
1800 insert near point without prompting for priority; (ii) to use
1801 defaults for date and time strings, to prompt for these, or to
1802 choose date from the Calendar.
1803 (todos-insert-item-here): Reimplement using todos-insert-item.
1804 (todos-delete-item): Don't move point after deleting last item.
1805 (todos-raise-item, todos-lower-item): Take done items into account.
1806 (todos-move-item): Don't move done items; update item numbering;
1807 restore if user quits before inserting moved item.
1808 (todos-print): Prompt for confirmation to print.
1809 (todos-reset-prefix): Search backward from end of file instead of
1810 forward from top.
1811 (todos-jump-to-category-noninteractively): Take Todos archive into
1812 account.
1813 (todos-category-select): Show or hide done items according to
1814 todos-show-with-done; if shown, coordinate separator and prefix
1815 overlays.
1816 (todos-add-item-non-interactively): Replace binary insertion
1817 algorithm with prompting for numerical priority.
1818 (todos-insert-with-overlays): Remove use of variable todos-item-end.
1819 (todos-item-start): Take done items into account; use
1820 todos-date-pattern.
1821 (todos-item-end): Reimplement using todos-forward-item.
1822 (todos-remove-item): Reimplement using todos-forward-item and
1823 todos-backward-item; redo overlay handling.
1824 (todos-mode-map): Add some new key bindings and change numerous
1825 existing bindings; use "i" as prefix key for item insertion
1826 commands.
1827 (todos-mode): Use todos-wrap-lines and delegate word-wrap and
1828 wrap-prefix settings to todos-wrap-and-indent; add to invisibility
1829 spec; set buffer-read-only to t and consequently let-bind this
1830 variable in all Todos commands that change buffer content.
1831 (todos-edit-mode): Make an indepent mode, not derived from text-mode.
1832 (todos-save): Don't save top priorities buffer.
1833 (todos-show): Make a no-op if called interactively in narrowed
1834 Todos mode, since, also to work around item prefix reduplication
1835 bug with show-paren-mode enabled; use todos-categories-list.
1836
1837 2012-09-12 Stephen Berman <stephen.berman@gmx.net>
1838
1839 Changes from 2009-11-07 (revision 109992).
1840 * calendar/todos.el: Comment out time-stamp require; require
1841 calendar and diary-lib.
1842 (todos-prefix): Change default value and doc string to reflect new
1843 meaning; add :initialize and :set functions.
1844 (todos-time-string-format, todos-entry-prefix-function)
1845 (todos-initials, todos-entry-timestamp-initials)
1846 (todos-prefix-face, todos-category-sep, todos-category-end)
1847 (todos-cp): Comment out.
1848 (todos-prefix-string): Inherit from font-lock-comment-face.
1849 (todos-item-header, todos-item-header-face): Remove.
1850 (todos-date, todos-time): New faces.
1851 (todos-date-face, todos-time-face): Corresponding new variables.
1852 (todos-add-time-string, todos-include-in-diary)
1853 (todos-exclusion-start, todos-exclusion-end, todos-number-prefix):
1854 New defcustoms.
1855 (todos-item-end, todos-item-start-overlays)
1856 (todos-item-end-overlays): New variables.
1857 (todos-date-string-match, todos-time-string-match): New functions.
1858 (todos-font-lock-keywords): Use them.
1859 (todos-current-date, todos-date-string, todos-time-string)
1860 (todos-toggle-item-diary-inclusion, todos-toggle-diary-inclusion)
1861 (todos-reset-prefix, todos-update-numbered-prefix)
1862 (todos-check-overlay, todos-item-overlays)
1863 (todos-insert-with-overlays, todos-show-paren-hack): New functions.
1864 (todos-highlight-item): New command.
1865 (todos-category-beg): Change value.
1866 (todos-category-select): Use todos-category-beg and todos-item-overlays.
1867 (todos-backward-item): Add optional count argument; use it and
1868 todos-item-start.
1869 (todos-forward-item): Use todos-check-overlay, todos-item-start
1870 and variable todos-item-end.
1871 (todos-edit-item, todos-delete-item): Use todos-number-prefix,
1872 todos-update-numbered-prefix, todos-item-overlays.
1873 (todos-add-category, todos-rename-category)
1874 (todos-list-categories): Use new category format.
1875 (todos-delete-category): Allow deleting non-empty category;
1876 use new category format.
1877 (todos-add-item-non-interactively): Comment out unnecessary
1878 save-excursion; use todos-insert-with-overlays.
1879 (todos-insert-item): Comment out unnecessary save-excursion; use
1880 new item format for date/time header and diary inclusion marking.
1881 (todos-insert-item-here): Use new item format for date/time header
1882 and diary inclusion marking; use todos-insert-with-overlays.
1883 (todos-raise-item): Make a no-op if point is on an empty line; use
1884 todos-insert-with-overlays.
1885 (todos-lower-item): Use todos-insert-with-overlays.
1886 (todos-top-priorities): Move call to todos-show inside
1887 save-excursion; add save-current-buffer after save-restriction.
1888 (todos-item-start): Use variable todos-item-end.
1889 (todos-item-end): Use todos-check-overlay and variable todos-item-end.
1890 (todos-remove-item): Take item overlays into account.
1891 (todos-mode): Change calculation of wrap-prefix; make
1892 hl-line-range-function a local variable and set it to highlight
1893 todo item.
1894 (todos-show): Ensure point stays at top of category.
1895
1896 2012-09-12 Stephen Berman <stephen.berman@gmx.net>
1897
1898 Changes from 2009-07-04 (revision 109991).
1899 * calendar/todos.el (todos-window-configuration): Comment out.
1900 (todos-display-categories): Comment out use of
1901 todos-window-configuration; use switch-to-buffer instead of
1902 pop-to-buffer.
1903 (todos-jump-to-category-noninteractively): Comment out use of
1904 todos-window-configuration.
1905 (todos-edit-item): Don't allow editing of date/time item header.
1906 (todos-insert-item, todos-insert-item-here): Insert date/time
1907 header in front of new item string.
1908 (todos-mode): Tweak wrap-prefix.
1909
1910 2012-09-12 Stephen Berman <stephen.berman@gmx.net>
1911
1912 Changes from 2009-06-26 (revision 109989).
1913 * calendar/todos.el (todos-file-do, todos-file-done):
1914 Change default location to directory "~/.emacs.d/".
1915 (todos-completion-ignore-case, todos-categories-buffer):
1916 New defcustoms.
1917 (todos-prefix-string, todos-item-header): New faces.
1918 (todos-prefix-face, todos-item-header-face): Corresponding
1919 new variables.
1920 (todos-rename-category, todos-delete-category)
1921 (todos-display-categories, todos-move-item): New commands.
1922 (todos-mode-map): Add key bindings for new commands and for
1923 todos-add-category, which had no key binding.
1924 (todos-jump-to-category-noninteractively): New function.
1925 (todos-top-priorities): Comment out code using a previously
1926 deleted variable.
1927 (todos-completing-read): Allow SPC to insert a space when entering
1928 a new category name; use todos-completion-ignore-case.
1929 (todos-font-lock-keywords, todos-window-configuration):
1930 New variables.
1931 (todos-mode): Make mode-name "TODOS"; make font-lock-defaults,
1932 word-wrap, and wrap-prefix local variables.
1933
1934 2012-09-12 Stephen Berman <stephen.berman@gmx.net>
1935
1936 Changes from 2009-02-16 (revision 109988).
1937 * calendar/todos.el (todos-list-categories): Fix typos.
1938 (todos-show): Ensure file is in todos-mode.
1939
1940 2012-09-12 Stephen Berman <stephen.berman@gmx.net>
1941
1942 Changes from 2009-02-12 (revision 109987).
1943 * calendar/todos.el (todos-header): Remove defvar.
1944 (todos-add-category): Comment out code that inserts and updates
1945 the file local variables first line of the file todos-file-do.
1946 (todos-list-categories): New function.
1947 (todos-show): Use it; remove use of a previously deleted variable.
1948
1949 2012-09-11 Stephen Berman <stephen.berman@gmx.net>
1950
1951 Changes from 2009-02-12 (revision 109986).
1952 * calendar/todos.el: New file. This is a copy of todo-mode.el
1953 from revision 94343 except for the following changes: replace all
1954 occurrences of the namespace prefix "todo-" with "todos-", delete
1955 the defvar todo-cats (the old name of todo-categories) and its use
1956 in todos-add-category, delete all defaliases of old command names.