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