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