Jari Aalto <jari.aalto@ntc.nokia.com> writes:

I just downloaded your package and after reading the docs I
    decided to do some reformatting.  Hope you don't mind.  Now they
    are in such a format that the html page can be automatically
    generated from the source file.  As an example, I generated the
    attached page using the following command: ripdoc.pls | \
    t2html.pls -a "Oliver.Seidel" -e Oliver.Seidel@cl.cam.ac.uk -simple

And of course I appreciate it.  Jari's stuff can be found at:
ftp://cs.uta.fi/pub/ssjaaa/, while I'm making the 1997-10-15T17:18:11Z!os10000@seidel-space.de page
available at http://www.cl.cam.ac.uk/users/os10000/doc/todo-mode.html
(That link will be valid until 10/1998 or slightly longer.)
This commit is contained in:
Oliver Seidel 1997-10-16 21:21:16 +00:00
parent 7b33b170cd
commit 01b864bc53

View file

@ -1,10 +1,10 @@
;;; todo-mode.el -- Major mode for editing TODO list files
;; todo-mode.el -- Major mode for editing TODO list files
;; Copyright (C) 1997 Free Software Foundation, Inc.
;; Author: Oliver.Seidel@cl.cam.ac.uk (was valid on Aug 2, 1997)
;; Created: 2 Aug 1997
;; Version: $Id: todo-mode.el,v 1.17 1997/10/15 14:30:41 os10000 Exp os10000 $
;; Version: $Id: todo-mode.el,v 1.18 1997/10/15 17:18:11 os10000 Exp os10000 $
;; Keywords: Categorised TODO list editor, todo-mode
;; This file is part of GNU Emacs.
@ -28,8 +28,7 @@
;;; Commentary:
;; Quickstart Installation:
;; ========================
;; Preface, Quickstart Installation
;;
;; To get this to work, make emacs execute the line
;;
@ -38,62 +37,57 @@
;; You may now enter new items by typing "M-x todo-insert-item", or enter
;; your the TODO list file by typing "M-x todo-show".
;;
;; The TODO list file has a special format and some auxiliary information,
;; which will be added by the todo-show function if it attempts to visit
;; an un-initialised file. Hence it is recommended to use the todo-show
;; function for the first time, in order to initialise the file, but it
;; is not necessary afterwards.
;; The TODO list file has a special format and some auxiliary
;; information, which will be added by the todo-show function if it
;; attempts to visit an un-initialised file. Hence it is
;; recommended to use the todo-show function for the first time, in
;; order to initialise the file, but it is not necessary
;; afterwards.
;;
;; As these commands are quite long to type, I would recommend the addition
;; of two bindings to your to your global keymap. I personally have the
;; following in my initialisation file:
;; As these commands are quite long to type, I would recommend the
;; addition of two bindings to your to your global keymap. I
;; personally have the following in my initialisation file:
;;
;; (global-set-key "\C-ct" 'todo-show) ;; switch to TODO buffer
;; (global-set-key "\C-ci" 'todo-insert-item) ;; insert new item
;;
;; Note, however, that this recommendation has prompted some criticism,
;; since the keys C-c LETTER are reserved for user functions. I believe
;; my recommendation is acceptable, since the Emacs Lisp Manual *Tips*
;; section also details that the mode itself should not bind any functions
;; to those keys. The express aim of the above two bindings is to work
;; outside the mode, which doesn't need the show function and offers
;; a different binding for the insert function. They serve as shortcuts
;; and are not even needed (since the TODO mode will be entered by
;; visiting the TODO file, and later by switching to its buffer).
;;
;;
;; Note, however, that this recommendation has prompted some
;; criticism, since the keys C-c LETTER are reserved for user
;; functions. I believe my recommendation is acceptable, since the
;; Emacs Lisp Manual *Tips* section also details that the mode itself
;; should not bind any functions to those keys. The express aim of
;; the above two bindings is to work outside the mode, which doesn't
;; need the show function and offers a different binding for the
;; insert function. They serve as shortcuts and are not even needed
;; (since the TODO mode will be entered by visiting the TODO file, and
;; later by switching to its buffer).
;;
;; Pre-Requisites
;; ==============
;;
;; This package will require the following packages to be available on
;; the load-path:
;; - time-stamp
;; - easymenu
;;
;; time-stamp
;; easymenu
;;
;;
;; Description:
;; ============
;; Mode Description
;;
;; TODO is a major mode for EMACS which offers functionality to treat
;; most lines in one buffer as a list of items one has to do. There
;; are facilities to add new items, which are categorised, to edit or
;; even delete items from the buffer. The buffer contents are currently
;; compatible with the diary, so that the list of todo-items will show
;; up in the FANCY diary mode.
;; even delete items from the buffer. The buffer contents are
;; currently compatible with the diary, so that the list of todo-items
;; will show up in the FANCY diary mode.
;;
;; Notice: Besides the major mode, this file also exports the function
;; "todo-show" which will change to the one specific TODO file that has
;; been specified in the todo-file-do variable. If this file does not
;; conform to the TODO mode conventions, the todo-show function will add
;; the appropriate header and footer. I don't anticipate this to cause
;; much grief, but be warned, in case you attempt to read a plain text file.
;; "todo-show" which will change to the one specific TODO file that
;; has been specified in the todo-file-do variable. If this file does
;; not conform to the TODO mode conventions, the todo-show function
;; will add the appropriate header and footer. I don't anticipate
;; this to cause much grief, but be warned, in case you attempt to
;; read a plain text file.
;;
;;
;;
;; Operation:
;; ==========
;; Operation
;;
;; You will have the following facilities available:
;;
@ -113,20 +107,18 @@
;; r to raise the current entry's priority
;; s to save the list
;;
;; When you add a new entry, you are asked for the text and then for the
;; category. I for example have categories for things that I want to do
;; in the office (like mail my mum), that I want to do in town (like buy
;; cornflakes) and things I want to do at home (move my suitcases). The
;; categories can be selected with the cursor keys and if you type in the
;; name of a category which didn't exist before, an empty category of the
;; desired name will be added and filled with the new entry.
;; When you add a new entry, you are asked for the text and then for
;; the category. I for example have categories for things that I want
;; to do in the office (like mail my mum), that I want to do in town
;; (like buy cornflakes) and things I want to do at home (move my
;; suitcases). The categories can be selected with the cursor keys
;; and if you type in the name of a category which didn't exist
;; before, an empty category of the desired name will be added and
;; filled with the new entry.
;;
;; Configuration
;;
;;
;; Configuration:
;; ==============
;;
;; --- todo-prefix
;; Variable todo-prefix
;;
;; I would like to recommend that you use the prefix "*/*" (by
;; leaving the variable 'todo-prefix' untouched) so that the diary
@ -139,19 +131,19 @@
;;
;; If you have the diary package set up to usually display more than
;; one day's entries at once, consider using
;;
;; "&%%(equal (calendar-current-date) date)"
;;
;; as the value of `todo-prefix'. Please note that this may slow down
;; the processing of your diary file some.
;;
;;
;; --- todo-file-do
;; Variable todo-file-do
;;
;; This variable is fairly self-explanatory. You have to store your TODO
;; list somewhere. This variable tells the package where to go and find
;; this file.
;;
;;
;; --- todo-file-done
;; Variable todo-file-done
;;
;; Even when you're done, you may wish to retain the entries. Given
;; that they're timestamped and you are offered to add a comment, this
@ -159,62 +151,53 @@
;; the EMACS diary package. So anyway, this variable holds the name
;; of the file for the filed todo-items.
;;
;;
;; --- todo-mode-hook
;; Variable todo-mode-hook
;;
;; Just like other modes, too, this mode offers to call your functions
;; before it goes about its business. This variable will be inspected
;; for any functions you may wish to have called once the other TODO
;; mode preparations have been completed.
;;
;; Variables todo-insert-threshold
;;
;; --- todo-insert-threshold
;; Another nifty feature is the insertion accuracy. If you have 8
;; items in your TODO list, then you may get asked 4 questions by the
;; binary insertion algorithm. However, you may not really have a
;; need for such accurate priorities amongst your TODO items. If you
;; now think about the binary insertion halfing the size of the window
;; each time, then the threshhold is the window size at which it will
;; stop. If you set the threshhold to zero, the upper and lower bound
;; will coincide at the end of the loop and you will insert your item
;; just before that point. If you set the threshhold to i.e. 8, it
;; will stop as soon as the window size drops below that amount and
;; will insert the item in the approximate centre of that window. I
;; got the idea for this feature after reading a very helpful e-mail
;; reply from Trey Jackson <trey@cs.berkeley.edu> who corrected some
;; of my awful coding and pointed me towards some good reading.
;; Thanks Trey!
;;
;; Another nifty feature is the insertion accuracy. If you have 8 items
;; in your TODO list, then you may get asked 4 questions by the binary
;; insertion algorithm. However, you may not really have a need for such
;; accurate priorities amongst your TODO items. If you now think about
;; the binary insertion halfing the size of the window each time, then
;; the threshhold is the window size at which it will stop. If you set
;; the threshhold to zero, the upper and lower bound will coincide at the
;; end of the loop and you will insert your item just before that point.
;; If you set the threshhold to i.e. 8, it will stop as soon as the window
;; size drops below that amount and will insert the item in the approximate
;; centre of that window. I got the idea for this feature after reading
;; a very helpful e-mail reply from Trey Jackson <trey@cs.berkeley.edu>
;; who corrected some of my awful coding and pointed me towards some good
;; reading. Thanks Trey!
;; Things to do
;;
;;
;;
;;
;; Things to do:
;; =============
;;
;; - licence / version function
;; - export to diary file
;; - todo-report-bug
;; - GNATS support
;; - add idea from Urban Boquist <boquist@cs.chalmers.se>: multi-line-entries
;; - 'e' opens buffer for multi-line entry
;; - elide multiline
;; - rewrite complete package to store data as lisp objects and have
;; o licence / version function
;; o export to diary file
;; o todo-report-bug
;; o GNATS support
;; o elide multiline
;; o rewrite complete package to store data as lisp objects and have
;; display modes for display, for diary export, etc.
;; (Richard Stallman pointed out this is a bad idea)
;; o base todo-mode.el on generic-mode.el instead
;;
;; History and Gossip
;;
;;
;; History and Gossip:
;; ===================
;;
;; Many thanks to all the ones who have contributed to the evolution of this
;; package! I hope I have listed all of you somewhere in the documentation
;; or at least in the RCS history!
;; Many thanks to all the ones who have contributed to the evolution
;; of this package! I hope I have listed all of you somewhere in the
;; documentation or at least in the RCS history!
;;
;; Enjoy this package and express your gratitude by sending nice things
;; to my parents' address!
;;
;; Oliver Seidel
;;
;; (O Seidel, Lessingstr. 8, 65760 Eschborn, Federal Republic of Germany)
;;
@ -225,6 +208,12 @@
;;; Change Log:
;; $Log: todo-mode.el,v $
;; Revision 1.18 1997/10/15 17:18:11 os10000
;; Everything seems to work in Harald Melands Emacs 20.02 and
;; my Emacs 19.34. Beware of the spelling in some of the
;; variable names. I looked up "threshold" in a dictionary
;; and here in Britain this appears to be the way to spell it.
;;
;; Revision 1.17 1997/10/15 14:30:41 os10000
;; Attempted to reconcile Harald's changes with mine since 1.15.
;;