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