aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Berman2012-12-03 00:37:25 +0100
committerStephen Berman2012-12-03 00:37:25 +0100
commitbbf95285a036398ed993e6051249f094b1c4d354 (patch)
tree265a866c7d80ff478edfeaf399bf3ace4e3af8e9
parent11aa0eef7e08002a532b864252e45561dbd544f2 (diff)
downloademacs-bbf95285a036398ed993e6051249f094b1c4d354.tar.gz
emacs-bbf95285a036398ed993e6051249f094b1c4d354.zip
* calendar/todos.el (todos-show): Fix a comment.
(todos-add-category): Prompt for a new category if passed category is the empty string, not nil.
-rw-r--r--lisp/ChangeLog40
-rw-r--r--lisp/calendar/todos.el9
2 files changed, 45 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 21e15256a05..98df5d3fe92 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12012-12-02 Stephen Berman <stephen.berman@gmx.net>
2
3 * calendar/todos.el (todos-show): Fix a comment.
4 (todos-add-category): Prompt for a new category if passed category
5 is the empty string, not nil.
6
12012-11-26 Stephen Berman <stephen.berman@gmx.net> 72012-11-26 Stephen Berman <stephen.berman@gmx.net>
2 8
3 * calendar/todos.el (todos-make-categories-list) 9 * calendar/todos.el (todos-make-categories-list)
@@ -42,11 +48,13 @@
42 48
432012-09-24 Stephen Berman <stephen.berman@gmx.net> 492012-09-24 Stephen Berman <stephen.berman@gmx.net>
44 50
51 Changes from 2012-07-14 (revision 110020).
45 * calendar/todos.el (todos-copy-item): New command. 52 * calendar/todos.el (todos-copy-item): New command.
46 (todos-insertion-map): Add key binding for it. 53 (todos-insertion-map): Add key binding for it.
47 54
482012-09-24 Stephen Berman <stephen.berman@gmx.net> 552012-09-24 Stephen Berman <stephen.berman@gmx.net>
49 56
57 Changes from 2012-07-13 (revision 110019).
50 * calendar/todos.el (todos-undo-item-omit-comment): New defcustom. 58 * calendar/todos.el (todos-undo-item-omit-comment): New defcustom.
51 (todos-item-undo): Use it. 59 (todos-item-undo): Use it.
52 (todos-allcats-file, todos-all-categories-alist): New variables. 60 (todos-allcats-file, todos-all-categories-alist): New variables.
@@ -57,6 +65,7 @@
57 65
582012-09-24 Stephen Berman <stephen.berman@gmx.net> 662012-09-24 Stephen Berman <stephen.berman@gmx.net>
59 67
68 Changes from 2012-06-27 (revision 110018).
60 * calendar/todos.el: Further code rearrangement; further new and 69 * calendar/todos.el: Further code rearrangement; further new and
61 revised comments. 70 revised comments.
62 (todos-reevaluate-filelist-defcustoms): Rename from 71 (todos-reevaluate-filelist-defcustoms): Rename from
@@ -73,6 +82,7 @@
73 82
742012-09-23 Stephen Berman <stephen.berman@gmx.net> 832012-09-23 Stephen Berman <stephen.berman@gmx.net>
75 84
85 Changes from 2012-06-25 (revision 110017).
76 * calendar/todos.el (todos-item-undo): Fix restoration on 86 * calendar/todos.el (todos-item-undo): Fix restoration on
77 cancelling; use buffer-substring-no-properties; comment out code 87 cancelling; use buffer-substring-no-properties; comment out code
78 removing mark overlay; fix insertion of undone items; display any 88 removing mark overlay; fix insertion of undone items; display any
@@ -80,6 +90,7 @@
80 90
812012-09-23 Stephen Berman <stephen.berman@gmx.net> 912012-09-23 Stephen Berman <stephen.berman@gmx.net>
82 92
93 Changes from 2012-06-24 (revision 110016).
83 * calendar/todos.el: Further significant code rearrangement; 94 * calendar/todos.el: Further significant code rearrangement;
84 further comment revision. 95 further comment revision.
85 (todos-mode-display): New defgroup. 96 (todos-mode-display): New defgroup.
@@ -108,6 +119,7 @@
108 119
1092012-09-23 Stephen Berman <stephen.berman@gmx.net> 1202012-09-23 Stephen Berman <stephen.berman@gmx.net>
110 121
122 Changes from 2012-06-21 (revision 110015).
111 * calendar/todos.el: Further comment revision. 123 * calendar/todos.el: Further comment revision.
112 (todos-sorted-column): Change default value, also taking tty into 124 (todos-sorted-column): Change default value, also taking tty into
113 account. 125 account.
@@ -137,6 +149,7 @@
137 149
1382012-09-23 Stephen Berman <stephen.berman@gmx.net> 1502012-09-23 Stephen Berman <stephen.berman@gmx.net>
139 151
152 Changes from 2012-06-15 (revision 110014).
140 * calendar/todos.el (todos-reset-done-separator) 153 * calendar/todos.el (todos-reset-done-separator)
141 (todos-reset-and-enable-done-separator): New functions. 154 (todos-reset-and-enable-done-separator): New functions.
142 (todos-reset-done-separator-string): Rewrite using 155 (todos-reset-done-separator-string): Rewrite using
@@ -148,6 +161,7 @@
148 161
1492012-09-23 Stephen Berman <stephen.berman@gmx.net> 1622012-09-23 Stephen Berman <stephen.berman@gmx.net>
150 163
164 Changes from 2012-06-14 (revision 110013).
151 * calendar/todos.el (todos-done-separator-string): New defcustom. 165 * calendar/todos.el (todos-done-separator-string): New defcustom.
152 (todos-done-separator): New variable replacing defcustom of the 166 (todos-done-separator): New variable replacing defcustom of the
153 same name. 167 same name.
@@ -161,6 +175,7 @@
161 175
1622012-09-23 Stephen Berman <stephen.berman@gmx.net> 1762012-09-23 Stephen Berman <stephen.berman@gmx.net>
163 177
178 Changes from 2012-06-03 (revision 110012).
164 * calendar/todos.el: Further comment revision. 179 * calendar/todos.el: Further comment revision.
165 (todos-sorted-column): Change default value. 180 (todos-sorted-column): Change default value.
166 (todos-item-start): Handle empty category (needed in 181 (todos-item-start): Handle empty category (needed in
@@ -187,6 +202,7 @@
187 202
1882012-09-23 Stephen Berman <stephen.berman@gmx.net> 2032012-09-23 Stephen Berman <stephen.berman@gmx.net>
189 204
205 Changes from 2012-06-02 (revision 110011).
190 * calendar/todos.el: Significant code rearrangement; further 206 * calendar/todos.el: Significant code rearrangement; further
191 comment revision. 207 comment revision.
192 (todos-filtered-items-buffer): Rename from todos-filter-buffer and 208 (todos-filtered-items-buffer): Rename from todos-filter-buffer and
@@ -210,6 +226,7 @@
210 226
2112012-09-22 Stephen Berman <stephen.berman@gmx.net> 2272012-09-22 Stephen Berman <stephen.berman@gmx.net>
212 228
229 Changes from 2012-06-02 (revision 110010).
213 * calendar/todos.el: Further code rearrangement and comment 230 * calendar/todos.el: Further code rearrangement and comment
214 revision. 231 revision.
215 (todos-item-start): Handle empty line between todo and done items 232 (todos-item-start): Handle empty line between todo and done items
@@ -226,6 +243,7 @@
226 243
2272012-09-22 Stephen Berman <stephen.berman@gmx.net> 2442012-09-22 Stephen Berman <stephen.berman@gmx.net>
228 245
246 Changes from 2012-06-01 (revision 110009).
229 * calendar/todos.el: Further code rearrangement and comment 247 * calendar/todos.el: Further code rearrangement and comment
230 revision. 248 revision.
231 (todos-add-to-buffer-list, todos-update-buffer-list): New functions. 249 (todos-add-to-buffer-list, todos-update-buffer-list): New functions.
@@ -261,6 +279,7 @@
261 279
2622012-09-21 Stephen Berman <stephen.berman@gmx.net> 2802012-09-21 Stephen Berman <stephen.berman@gmx.net>
263 281
282 Changes from 2012-05-29 (revision 110008).
264 * calendar/todos.el: Further comment revision. 283 * calendar/todos.el: Further comment revision.
265 (todos-item-end): Replace use of command todos-forward-item by 284 (todos-item-end): Replace use of command todos-forward-item by
266 regexp searches using internal variables. 285 regexp searches using internal variables.
@@ -269,6 +288,7 @@
269 288
2702012-09-21 Stephen Berman <stephen.berman@gmx.net> 2892012-09-21 Stephen Berman <stephen.berman@gmx.net>
271 290
291 Changes from 2012-05-29 (revision 110007).
272 * calendar/todos.el (todos-ignore-archived-categories): 292 * calendar/todos.el (todos-ignore-archived-categories):
273 Revert last change; remove :initialize and :set functions; change 293 Revert last change; remove :initialize and :set functions; change
274 use and change users accordingly. 294 use and change users accordingly.
@@ -295,11 +315,13 @@
295 315
2962012-09-21 Stephen Berman <stephen.berman@gmx.net> 3162012-09-21 Stephen Berman <stephen.berman@gmx.net>
297 317
318 Changes from 2012-05-28 (revision 110006).
298 * calendar/todos.el: Doubts about todos-ignore-archived-categories. 319 * calendar/todos.el: Doubts about todos-ignore-archived-categories.
299 (todos-ignore-archived-categories): Change default value. 320 (todos-ignore-archived-categories): Change default value.
300 321
3012012-09-21 Stephen Berman <stephen.berman@gmx.net> 3222012-09-21 Stephen Berman <stephen.berman@gmx.net>
302 323
324 Changes from 2012-05-27 (revision 110005).
303 * calendar/todos.el: Further comment revision. 325 * calendar/todos.el: Further comment revision.
304 (todos-reset-global-current-todos-file): 326 (todos-reset-global-current-todos-file):
305 Try to make this not slow down kill-buffer. 327 Try to make this not slow down kill-buffer.
@@ -315,6 +337,7 @@
315 337
3162012-09-21 Stephen Berman <stephen.berman@gmx.net> 3382012-09-21 Stephen Berman <stephen.berman@gmx.net>
317 339
340 Changes from 2012-05-25 (revision 110004).
318 * calendar/todos.el: Further comment revision. 341 * calendar/todos.el: Further comment revision.
319 (todos-set-item-top-priority): New command. 342 (todos-set-item-top-priority): New command.
320 (todos-reset-global-current-todos-file): 343 (todos-reset-global-current-todos-file):
@@ -352,6 +375,7 @@
352 375
3532012-09-21 Stephen Berman <stephen.berman@gmx.net> 3762012-09-21 Stephen Berman <stephen.berman@gmx.net>
354 377
378 Changes from 2012-05-23 (revision 110003).
355 * calendar/todos.el (todos-key-bindings): Remove binding of 379 * calendar/todos.el (todos-key-bindings): Remove binding of
356 deleted command. 380 deleted command.
357 (todos-menu): Remove entry of deleted command. 381 (todos-menu): Remove entry of deleted command.
@@ -362,6 +386,7 @@
362 386
3632012-09-21 Stephen Berman <stephen.berman@gmx.net> 3872012-09-21 Stephen Berman <stephen.berman@gmx.net>
364 388
389 Changes from 2012-05-22 (revision 110002).
365 * calendar/todos.el (todos-set-show-current-file): Rename from 390 * calendar/todos.el (todos-set-show-current-file): Rename from
366 todos-toggle-show-current-file and adjust callers. 391 todos-toggle-show-current-file and adjust callers.
367 (todos-number-priorities): Rename from todos-number-prefix and 392 (todos-number-priorities): Rename from todos-number-prefix and
@@ -380,6 +405,7 @@
380 405
3812012-09-21 Stephen Berman <stephen.berman@gmx.net> 4062012-09-21 Stephen Berman <stephen.berman@gmx.net>
382 407
408 Changes from 2012-05-21 (revision 110001).
383 * calendar/todos.el: Further comment revision and code 409 * calendar/todos.el: Further comment revision and code
384 rearrangement. 410 rearrangement.
385 (todos-item-end): Revert last change. 411 (todos-item-end): Revert last change.
@@ -396,6 +422,7 @@
396 422
3972012-09-21 Stephen Berman <stephen.berman@gmx.net> 4232012-09-21 Stephen Berman <stephen.berman@gmx.net>
398 424
425 Changes from 2012-05-19 (revision 110000).
399 * calendar/todos.el: Add and revise further doc strings and 426 * calendar/todos.el: Add and revise further doc strings and
400 comments. 427 comments.
401 (todos-filter-function, todos-custom-items) 428 (todos-filter-function, todos-custom-items)
@@ -418,6 +445,7 @@
418 445
4192012-09-20 Stephen Berman <stephen.berman@gmx.net> 4462012-09-20 Stephen Berman <stephen.berman@gmx.net>
420 447
448 Changes from 2012-05-17 (revision 109999).
421 * calendar/todos.el: Add and revise further doc strings and 449 * calendar/todos.el: Add and revise further doc strings and
422 comments; major code rearrangement. 450 comments; major code rearrangement.
423 (todos-merged-files, todos-prompt-merged-files) 451 (todos-merged-files, todos-prompt-merged-files)
@@ -554,11 +582,13 @@
554 582
5552012-09-19 Stephen Berman <stephen.berman@gmx.net> 5832012-09-19 Stephen Berman <stephen.berman@gmx.net>
556 584
585 Changes from 2011-12-03 (revision 109998).
557 * calendar/todos.el (todos-item-start): Restore commented out code 586 * calendar/todos.el (todos-item-start): Restore commented out code
558 to prevent wrongly moving point in widened buffer. 587 to prevent wrongly moving point in widened buffer.
559 588
5602012-09-19 Stephen Berman <stephen.berman@gmx.net> 5892012-09-19 Stephen Berman <stephen.berman@gmx.net>
561 590
591 Changes from 2011-12-02 (revision 109997).
562 * calendar/todos.el: Remove old commentary from todo-mode.el; add 592 * calendar/todos.el: Remove old commentary from todo-mode.el; add
563 and revise further doc strings and comments; require cl.el at 593 and revise further doc strings and comments; require cl.el at
564 compile time for remove-duplicates; use function powerset from 594 compile time for remove-duplicates; use function powerset from
@@ -764,6 +794,7 @@
764 794
7652012-09-18 Stephen Berman <stephen.berman@gmx.net> 7952012-09-18 Stephen Berman <stephen.berman@gmx.net>
766 796
797 Changes from 2011-05-16 (revision 109996).
767 * calendar/todos.el Add and revise various doc strings, remove 798 * calendar/todos.el Add and revise various doc strings, remove
768 further commented out code; add further comments; further code 799 further commented out code; add further comments; further code
769 rearrangement. 800 rearrangement.
@@ -988,6 +1019,7 @@
988 1019
9892012-09-14 Stephen Berman <stephen.berman@gmx.net> 10202012-09-14 Stephen Berman <stephen.berman@gmx.net>
990 1021
1022 Changes from 2010-07-09 (revision 109995).
991 * calendar/todos.el Remove lots of commented out code; add various 1023 * calendar/todos.el Remove lots of commented out code; add various
992 comments; further code rearrangement. 1024 comments; further code rearrangement.
993 (todos-insert-item-here-ask-date-time) 1025 (todos-insert-item-here-ask-date-time)
@@ -1053,6 +1085,7 @@
1053 1085
10542012-09-13 Stephen Berman <stephen.berman@gmx.net> 10862012-09-13 Stephen Berman <stephen.berman@gmx.net>
1055 1087
1088 Changes from 2010-06-18 (revision 109994).
1056 * calendar/todos.el: Numerous spelling and comment fixes, doc 1089 * calendar/todos.el: Numerous spelling and comment fixes, doc
1057 string fixes to conform with checkdoc, further rearrangement of 1090 string fixes to conform with checkdoc, further rearrangement of
1058 definitions, etc. 1091 definitions, etc.
@@ -1148,6 +1181,7 @@
1148 1181
11492012-09-13 Stephen Berman <stephen.berman@gmx.net> 11822012-09-13 Stephen Berman <stephen.berman@gmx.net>
1150 1183
1184 Changes from 2010-05-25 (revision 109993).
1151 * calendar/todos.el: Comment out calendar require, since diary-lib 1185 * calendar/todos.el: Comment out calendar require, since diary-lib
1152 requires calendar. Rearrange file to group definitions according 1186 requires calendar. Rearrange file to group definitions according
1153 to their use (types of commands, internal functions, etc.) 1187 to their use (types of commands, internal functions, etc.)
@@ -1242,6 +1276,7 @@
1242 1276
12432012-09-12 Stephen Berman <stephen.berman@gmx.net> 12772012-09-12 Stephen Berman <stephen.berman@gmx.net>
1244 1278
1279 Changes from 2009-11-07 (revision 109992).
1245 * calendar/todos.el: Comment out time-stamp require; require 1280 * calendar/todos.el: Comment out time-stamp require; require
1246 calendar and diary-lib. 1281 calendar and diary-lib.
1247 (todos-prefix): Change default value and doc string to reflect new 1282 (todos-prefix): Change default value and doc string to reflect new
@@ -1300,6 +1335,7 @@
1300 1335
13012012-09-12 Stephen Berman <stephen.berman@gmx.net> 13362012-09-12 Stephen Berman <stephen.berman@gmx.net>
1302 1337
1338 Changes from 2009-07-04 (revision 109991).
1303 * calendar/todos.el (todos-window-configuration): Comment out. 1339 * calendar/todos.el (todos-window-configuration): Comment out.
1304 (todos-display-categories): Comment out use of 1340 (todos-display-categories): Comment out use of
1305 todos-window-configuration; use switch-to-buffer instead of 1341 todos-window-configuration; use switch-to-buffer instead of
@@ -1313,6 +1349,7 @@
1313 1349
13142012-09-12 Stephen Berman <stephen.berman@gmx.net> 13502012-09-12 Stephen Berman <stephen.berman@gmx.net>
1315 1351
1352 Changes from 2009-06-26 (revision 109989).
1316 * calendar/todos.el (todos-file-do, todos-file-done): 1353 * calendar/todos.el (todos-file-do, todos-file-done):
1317 Change default location to directory "~/.emacs.d/". 1354 Change default location to directory "~/.emacs.d/".
1318 (todos-completion-ignore-case, todos-categories-buffer): 1355 (todos-completion-ignore-case, todos-categories-buffer):
@@ -1336,11 +1373,13 @@
1336 1373
13372012-09-12 Stephen Berman <stephen.berman@gmx.net> 13742012-09-12 Stephen Berman <stephen.berman@gmx.net>
1338 1375
1376 Changes from 2009-02-16 (revision 109988).
1339 * calendar/todos.el (todos-list-categories): Fix typos. 1377 * calendar/todos.el (todos-list-categories): Fix typos.
1340 (todos-show): Ensure file is in todos-mode. 1378 (todos-show): Ensure file is in todos-mode.
1341 1379
13422012-09-12 Stephen Berman <stephen.berman@gmx.net> 13802012-09-12 Stephen Berman <stephen.berman@gmx.net>
1343 1381
1382 Changes from 2009-02-12 (revision 109987).
1344 * calendar/todos.el (todos-header): Remove defvar. 1383 * calendar/todos.el (todos-header): Remove defvar.
1345 (todos-add-category): Comment out code that inserts and updates 1384 (todos-add-category): Comment out code that inserts and updates
1346 the file local variables first line of the file todos-file-do. 1385 the file local variables first line of the file todos-file-do.
@@ -1349,6 +1388,7 @@
1349 1388
13502012-09-11 Stephen Berman <stephen.berman@gmx.net> 13892012-09-11 Stephen Berman <stephen.berman@gmx.net>
1351 1390
1391 Changes from 2009-02-12 (revision 109986).
1352 * calendar/todos.el: New file. This is a copy of todo-mode.el 1392 * calendar/todos.el: New file. This is a copy of todo-mode.el
1353 from revision 94343 except for the following changes: replace all 1393 from revision 94343 except for the following changes: replace all
1354 occurrences of the namespace prefix "todo-" with "todos-", delete 1394 occurrences of the namespace prefix "todo-" with "todos-", delete
diff --git a/lisp/calendar/todos.el b/lisp/calendar/todos.el
index 0e2ee569faa..70f144d8004 100644
--- a/lisp/calendar/todos.el
+++ b/lisp/calendar/todos.el
@@ -2792,9 +2792,8 @@ corresponding Todos file, displaying the corresponding category."
2792 ;; file, if it exists. 2792 ;; file, if it exists.
2793 (when (assoc cat todos-categories) 2793 (when (assoc cat todos-categories)
2794 (setq todos-category-number (todos-category-number cat))) 2794 (setq todos-category-number (todos-category-number cat)))
2795 ;; If no Todos file exists, initialize one. 2795 ;; If this is a new Todos file, add its first category.
2796 (when (zerop (buffer-size)) 2796 (when (zerop (buffer-size))
2797 ;; Call with empty category name to get initial prompt.
2798 (setq todos-category-number (todos-add-category ""))) 2797 (setq todos-category-number (todos-add-category "")))
2799 (save-excursion (todos-category-select))) 2798 (save-excursion (todos-category-select)))
2800 (setq todos-first-visit nil))) 2799 (setq todos-first-visit nil)))
@@ -3641,6 +3640,7 @@ The items are those in the files listed in `todos-filter-files'."
3641 (todos-filter-items 'regexp t) 3640 (todos-filter-items 'regexp t)
3642 (todos-filtered-buffer-name buf files))) 3641 (todos-filtered-buffer-name buf files)))
3643 3642
3643;; ---------------------------------------------------------------------------
3644;;; Editing Commands 3644;;; Editing Commands
3645 3645
3646(defun todos-add-file () 3646(defun todos-add-file ()
@@ -3665,7 +3665,6 @@ Noninteractively, return the name of the new file."
3665 (todos-show)) 3665 (todos-show))
3666 file))) 3666 file)))
3667 3667
3668;; ---------------------------------------------------------------------------
3669;;; Category editing commands 3668;;; Category editing commands
3670 3669
3671(defun todos-add-category (&optional cat) 3670(defun todos-add-category (&optional cat)
@@ -3677,7 +3676,9 @@ the category name and the return value is the category number."
3677 (let* ((buffer-read-only) 3676 (let* ((buffer-read-only)
3678 (num (1+ (length todos-categories))) 3677 (num (1+ (length todos-categories)))
3679 (counts (make-vector 4 0))) ; [todo diary done archived] 3678 (counts (make-vector 4 0))) ; [todo diary done archived]
3680 (unless cat 3679 ;; If cat is passed from caller, don't prompt, unless it is "",
3680 ;; which means the file was just added and has no category yet.
3681 (unless (and cat (> (length cat) 0))
3681 (setq cat (todos-read-category "Enter new category name: " nil t))) 3682 (setq cat (todos-read-category "Enter new category name: " nil t)))
3682 (setq todos-categories (append todos-categories (list (cons cat counts)))) 3683 (setq todos-categories (append todos-categories (list (cons cat counts))))
3683 (widen) 3684 (widen)