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