From: Stephen Berman Date: Sat, 8 Jun 2013 23:40:21 +0000 (+0200) Subject: * todos.el: Improve commentary. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2029 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=85ea34e22c971c7e7bbd6cc48972905bcf70c72f;p=emacs.git * todos.el: Improve commentary. (todos-item-end): Revert last change, since bug#14565 is now fixed. --- diff --git a/lisp/calendar/ChangeLog b/lisp/calendar/ChangeLog index 86f268816cb..b09cf30f1c7 100644 --- a/lisp/calendar/ChangeLog +++ b/lisp/calendar/ChangeLog @@ -1,6 +1,13 @@ +2013-06-08 Stephen Berman + + * todos.el: Improve commentary. + (todos-item-end): Revert last change, since bug#14565 is now fixed. + 2013-06-07 Stephen Berman * todos.el: Reorganize file structure again, to pacify byte-compiler. + (todos-item-end): Use if-else instead of when-sexp to avoid + explicit nil argument of backward-char (bug#14565). 2013-06-06 Stephen Berman @@ -24,7 +31,7 @@ 2013-06-05 Stephen Berman - * todos.el: Further code cleanup. Changes to commentary. Remove + * todos.el: Further code cleanup. Improve commentary. Remove autoload cookies. Handle todo items in Fancy Diary display. (todos-done-separator): Reinstate length one less than window-width until bug#2749 is fixed. diff --git a/lisp/calendar/todos.el b/lisp/calendar/todos.el index f2c31a33aea..6d79fadd106 100644 --- a/lisp/calendar/todos.el +++ b/lisp/calendar/todos.el @@ -22,49 +22,54 @@ ;;; Commentary: -;; This package provides facilities for making, displaying, navigating and -;; editing todo lists, which are prioritized lists of todo items. Todo lists -;; are identified with named categories, so you can group together and -;; separately prioritize thematically related todo items. Each category is -;; stored in a file, which thus provides a further level of organization. You -;; can create as many todo files, and in each as many categories, as you want. - -;; With Todos you can navigate among the items of a category, and between -;; categories in the same and in different todo files. You can edit todo -;; items, reprioritize them within their category, move them to another -;; category, delete them, or mark items as done and store them separately from -;; the not yet done items in a category. You can add new todo files and -;; categories, rename categories, move them to another file or delete them. -;; You can also display summary tables of the categories in a file and the -;; types of items they contain. And you can build cross-categorial lists of -;; items that satisfy various criteria. - -;; To get started, load this package and type `M-x todos-show'. This will -;; prompt you for the name of the first todo file, its first category and the -;; category's first item, create these and display them in Todos mode. Now -;; you can insert further items into the list (i.e., the category) and assign -;; them priorities by typing `i i'. - -;; You will probably find it convenient to give `todos-show' a global key -;; binding in your init file, since it is one of the entry points to Todos -;; mode; a good choice is `C-c t', since `todos-show' is bound to `t' in Todos -;; mode. - -;; To see a list of all Todos mode commands and their key bindings, including -;; other entry points, type `C-h m' in Todos mode. Consult the document -;; strings of the commands for details of their use. The `todos' -;; customization group and its subgroups list the options you can set to alter -;; the behavior of many commands and various aspects of the display. - -;; This package is a new version of Oliver Seidel's todo-mode.el, which -;; retains the same basic organization and handling of todo lists and the -;; basic UI, but extends these in many ways and reimplements most of the -;; internals. +;; This package provides facilities for making, displaying, navigating +;; and editing todo lists, which are prioritized lists of todo items. +;; Todo lists are identified with named categories, so you can group +;; together and separately prioritize thematically related todo items. +;; Each category is stored in a file, which thus provides a further +;; level of organization. You can create as many todo files, and in +;; each as many categories, as you want. + +;; With Todos you can navigate among the items of a category, and +;; between categories in the same and in different todo files. You +;; can edit todo items, reprioritize them within their category, move +;; them to another category, delete them, or mark items as done and +;; store them separately from the not yet done items in a category. +;; You can add new todo files and categories, rename categories, move +;; them to another file or delete them. You can also display summary +;; tables of the categories in a file and the types of items they +;; contain. And you can build cross-categorial lists of items that +;; satisfy various criteria. + +;; To get started, load this package and type `M-x todos-show'. This +;; will prompt you for the name of the first todo file, its first +;; category and the category's first item, create these and display +;; them in Todos mode. Now you can insert further items into the list +;; (i.e., the category) and assign them priorities by typing `i i'. + +;; You will probably find it convenient to give `todos-show' a global +;; key binding in your init file, since it is one of the entry points +;; to Todos mode; a good choice is `C-c t', since `todos-show' is +;; bound to `t' in Todos mode. + +;; To see a list of all Todos mode commands and their key bindings, +;; including other entry points, type `C-h m' in Todos mode. Consult +;; the document strings of the commands for details of their use. The +;; `todos' customization group and its subgroups list the options you +;; can set to alter the behavior of many commands and various aspects +;; of the display. + +;; This package is a new version of Oliver Seidel's todo-mode.el. +;; While it retains the same basic organization and handling of todo +;; lists and the basic UI, it significantly extends these, adds many +;; features, changes much of the internals and reimplements almost all +;; of the code. ;;; Code: (require 'diary-lib) -;; For cl-remove-duplicates (in todos-insertion-commands-args) and cl-oddp. +;; For cl-remove-duplicates (in todos-insertion-commands-args) and +;; cl-oddp. (require 'cl-lib) ;; ----------------------------------------------------------------------------- @@ -4918,10 +4923,7 @@ but the categories sexp differs from the current value of (if to-lim lim (point-max)))) ;; For last todo item, skip back over the empty line before the done ;; items section, else just back to the end of the previous line. - ;; (When byte-comiled, backward-char barfs on an argument that evaluates - ;; to nil (bug#14565).) - ;; (backward-char (when (and to-lim (not done) (eq (point) lim)) 2)) - (backward-char (if (and to-lim (not done) (eq (point) lim)) 2 1)) + (backward-char (when (and to-lim (not done) (eq (point) lim)) 2)) (point)))) (defun todos-item-string ()