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