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