annotate lisp/calendar/todo-mode.el @ 20084:c97d281f1bd2

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 rev 1.18 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.)
author Oliver Seidel <os10000@seidel-space.de>
date Thu, 16 Oct 1997 21:21:16 +0000
parents cf048b490803
children 1d51bc7c2563
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
1 ;; todo-mode.el -- Major mode for editing TODO list files
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
2
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
3 ;; Copyright (C) 1997 Free Software Foundation, Inc.
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
4
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
5 ;; Author: Oliver.Seidel@cl.cam.ac.uk (was valid on Aug 2, 1997)
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
6 ;; Created: 2 Aug 1997
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
7 ;; Version: $Id: todo-mode.el,v 1.18 1997/10/15 17:18:11 os10000 Exp os10000 $
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
8 ;; Keywords: Categorised TODO list editor, todo-mode
19180
5de82ccd80eb Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents: 19179
diff changeset
9
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
10 ;; This file is part of GNU Emacs.
19180
5de82ccd80eb Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents: 19179
diff changeset
11
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
19180
5de82ccd80eb Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents: 19179
diff changeset
13 ;; it under the terms of the GNU General Public License as published by
5de82ccd80eb Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents: 19179
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
5de82ccd80eb Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents: 19179
diff changeset
15 ;; any later version.
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
16
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
17 ;; GNU Emacs is distributed in the hope that it will be useful,
19180
5de82ccd80eb Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents: 19179
diff changeset
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
5de82ccd80eb Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents: 19179
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5de82ccd80eb Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents: 19179
diff changeset
20 ;; GNU General Public License for more details.
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
21
19180
5de82ccd80eb Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents: 19179
diff changeset
22 ;; You should have received a copy of the GNU General Public License
5de82ccd80eb Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents: 19179
diff changeset
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
5de82ccd80eb Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents: 19179
diff changeset
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
5de82ccd80eb Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents: 19179
diff changeset
25 ;; Boston, MA 02111-1307, USA.
5de82ccd80eb Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents: 19179
diff changeset
26
5de82ccd80eb Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents: 19179
diff changeset
27 ;; ---------------------------------------------------------------------------
5de82ccd80eb Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents: 19179
diff changeset
28
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
29 ;;; Commentary:
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
30
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
31 ;; Preface, Quickstart Installation
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
32 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
33 ;; To get this to work, make emacs execute the line
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
34 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
35 ;; (require 'todo-mode) ;; load the TODO package
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
36 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
37 ;; You may now enter new items by typing "M-x todo-insert-item", or enter
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
38 ;; your the TODO list file by typing "M-x todo-show".
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
39 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
40 ;; The TODO list file has a special format and some auxiliary
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
41 ;; information, which will be added by the todo-show function if it
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
42 ;; attempts to visit an un-initialised file. Hence it is
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
43 ;; recommended to use the todo-show function for the first time, in
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
44 ;; order to initialise the file, but it is not necessary
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
45 ;; afterwards.
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
46 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
47 ;; As these commands are quite long to type, I would recommend the
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
48 ;; addition of two bindings to your to your global keymap. I
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
49 ;; personally have the following in my initialisation file:
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
50 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
51 ;; (global-set-key "\C-ct" 'todo-show) ;; switch to TODO buffer
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
52 ;; (global-set-key "\C-ci" 'todo-insert-item) ;; insert new item
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
53 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
54 ;; Note, however, that this recommendation has prompted some
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
55 ;; criticism, since the keys C-c LETTER are reserved for user
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
56 ;; functions. I believe my recommendation is acceptable, since the
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
57 ;; Emacs Lisp Manual *Tips* section also details that the mode itself
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
58 ;; should not bind any functions to those keys. The express aim of
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
59 ;; the above two bindings is to work outside the mode, which doesn't
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
60 ;; need the show function and offers a different binding for the
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
61 ;; insert function. They serve as shortcuts and are not even needed
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
62 ;; (since the TODO mode will be entered by visiting the TODO file, and
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
63 ;; later by switching to its buffer).
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
64 ;;
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
65 ;; Pre-Requisites
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
66 ;;
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
67 ;; This package will require the following packages to be available on
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
68 ;; the load-path:
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
69 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
70 ;; time-stamp
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
71 ;; easymenu
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
72 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
73 ;; Mode Description
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
74 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
75 ;; TODO is a major mode for EMACS which offers functionality to treat
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
76 ;; most lines in one buffer as a list of items one has to do. There
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
77 ;; are facilities to add new items, which are categorised, to edit or
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
78 ;; even delete items from the buffer. The buffer contents are
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
79 ;; currently compatible with the diary, so that the list of todo-items
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
80 ;; will show up in the FANCY diary mode.
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
81 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
82 ;; Notice: Besides the major mode, this file also exports the function
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
83 ;; "todo-show" which will change to the one specific TODO file that
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
84 ;; has been specified in the todo-file-do variable. If this file does
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
85 ;; not conform to the TODO mode conventions, the todo-show function
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
86 ;; will add the appropriate header and footer. I don't anticipate
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
87 ;; this to cause much grief, but be warned, in case you attempt to
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
88 ;; read a plain text file.
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
89 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
90 ;; Operation
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
91 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
92 ;; You will have the following facilities available:
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
93 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
94 ;; M-x todo-show will enter the todo list screen, here type
19187
9d37b4ab16b5 Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents: 19186
diff changeset
95 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
96 ;; + to go to next category
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
97 ;; - to go to previous category
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
98 ;; e to edit the current entry
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
99 ;; f to file the current entry, including a
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
100 ;; comment and timestamp
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
101 ;; i to insert a new entry
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
102 ;; k to kill the current entry
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
103 ;; l to lower the current entry's priority
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
104 ;; n for the next entry
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
105 ;; p for the previous entry
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
106 ;; q to save the list and exit the buffer
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
107 ;; r to raise the current entry's priority
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
108 ;; s to save the list
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
109 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
110 ;; When you add a new entry, you are asked for the text and then for
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
111 ;; the category. I for example have categories for things that I want
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
112 ;; to do in the office (like mail my mum), that I want to do in town
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
113 ;; (like buy cornflakes) and things I want to do at home (move my
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
114 ;; suitcases). The categories can be selected with the cursor keys
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
115 ;; and if you type in the name of a category which didn't exist
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
116 ;; before, an empty category of the desired name will be added and
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
117 ;; filled with the new entry.
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
118 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
119 ;; Configuration
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
120 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
121 ;; Variable todo-prefix
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
122 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
123 ;; I would like to recommend that you use the prefix "*/*" (by
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
124 ;; leaving the variable 'todo-prefix' untouched) so that the diary
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
125 ;; displays each entry every day.
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
126 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
127 ;; To understand what I mean, please read the documentation that goes
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
128 ;; with the calendar since that will tell you how you can set up the
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
129 ;; fancy diary display and use the #include command to include your
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
130 ;; todo list file as part of your diary.
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
131 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
132 ;; If you have the diary package set up to usually display more than
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
133 ;; one day's entries at once, consider using
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
134 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
135 ;; "&%%(equal (calendar-current-date) date)"
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
136 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
137 ;; as the value of `todo-prefix'. Please note that this may slow down
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
138 ;; the processing of your diary file some.
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
139 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
140 ;; Variable todo-file-do
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
141 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
142 ;; This variable is fairly self-explanatory. You have to store your TODO
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
143 ;; list somewhere. This variable tells the package where to go and find
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
144 ;; this file.
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
145 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
146 ;; Variable todo-file-done
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
147 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
148 ;; Even when you're done, you may wish to retain the entries. Given
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
149 ;; that they're timestamped and you are offered to add a comment, this
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
150 ;; can make a useful diary of past events. It will even blend in with
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
151 ;; the EMACS diary package. So anyway, this variable holds the name
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
152 ;; of the file for the filed todo-items.
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
153 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
154 ;; Variable todo-mode-hook
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
155 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
156 ;; Just like other modes, too, this mode offers to call your functions
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
157 ;; before it goes about its business. This variable will be inspected
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
158 ;; for any functions you may wish to have called once the other TODO
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
159 ;; mode preparations have been completed.
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
160 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
161 ;; Variables todo-insert-threshold
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
162 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
163 ;; Another nifty feature is the insertion accuracy. If you have 8
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
164 ;; items in your TODO list, then you may get asked 4 questions by the
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
165 ;; binary insertion algorithm. However, you may not really have a
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
166 ;; need for such accurate priorities amongst your TODO items. If you
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
167 ;; now think about the binary insertion halfing the size of the window
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
168 ;; each time, then the threshhold is the window size at which it will
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
169 ;; stop. If you set the threshhold to zero, the upper and lower bound
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
170 ;; will coincide at the end of the loop and you will insert your item
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
171 ;; just before that point. If you set the threshhold to i.e. 8, it
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
172 ;; will stop as soon as the window size drops below that amount and
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
173 ;; will insert the item in the approximate centre of that window. I
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
174 ;; got the idea for this feature after reading a very helpful e-mail
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
175 ;; reply from Trey Jackson <trey@cs.berkeley.edu> who corrected some
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
176 ;; of my awful coding and pointed me towards some good reading.
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
177 ;; Thanks Trey!
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
178 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
179 ;; Things to do
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
180 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
181 ;; o licence / version function
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
182 ;; o export to diary file
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
183 ;; o todo-report-bug
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
184 ;; o GNATS support
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
185 ;; o elide multiline
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
186 ;; o rewrite complete package to store data as lisp objects and have
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
187 ;; display modes for display, for diary export, etc.
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
188 ;; (Richard Stallman pointed out this is a bad idea)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
189 ;; o base todo-mode.el on generic-mode.el instead
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
190 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
191 ;; History and Gossip
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
192 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
193 ;; Many thanks to all the ones who have contributed to the evolution
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
194 ;; of this package! I hope I have listed all of you somewhere in the
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
195 ;; documentation or at least in the RCS history!
19189
1519cf07cfab Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents: 19188
diff changeset
196 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
197 ;; Enjoy this package and express your gratitude by sending nice things
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
198 ;; to my parents' address!
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
199 ;;
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
200 ;; Oliver Seidel
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
201 ;; (O Seidel, Lessingstr. 8, 65760 Eschborn, Federal Republic of Germany)
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
202 ;;
19180
5de82ccd80eb Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents: 19179
diff changeset
203
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
204 ;; ---------------------------------------------------------------------------
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
205
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
206 ;; ---------------------------------------------------------------------------
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
207
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
208 ;;; Change Log:
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
209
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
210 ;; $Log: todo-mode.el,v $
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
211 ;; Revision 1.18 1997/10/15 17:18:11 os10000
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
212 ;; Everything seems to work in Harald Melands Emacs 20.02 and
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
213 ;; my Emacs 19.34. Beware of the spelling in some of the
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
214 ;; variable names. I looked up "threshold" in a dictionary
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
215 ;; and here in Britain this appears to be the way to spell it.
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
216 ;;
20045
cf048b490803 Everything seems to work in Harald Melands Emacs 20.02 and
Oliver Seidel <os10000@seidel-space.de>
parents: 20044
diff changeset
217 ;; Revision 1.17 1997/10/15 14:30:41 os10000
cf048b490803 Everything seems to work in Harald Melands Emacs 20.02 and
Oliver Seidel <os10000@seidel-space.de>
parents: 20044
diff changeset
218 ;; Attempted to reconcile Harald's changes with mine since 1.15.
cf048b490803 Everything seems to work in Harald Melands Emacs 20.02 and
Oliver Seidel <os10000@seidel-space.de>
parents: 20044
diff changeset
219 ;;
20044
703ef56b7eb6 Attempted to reconcile Harald's changes with mine since 1.15.
Oliver Seidel <os10000@seidel-space.de>
parents: 20043
diff changeset
220 ;; Revision 1.16 1997/10/15 14:00:12 os10000
703ef56b7eb6 Attempted to reconcile Harald's changes with mine since 1.15.
Oliver Seidel <os10000@seidel-space.de>
parents: 20043
diff changeset
221 ;; Fixed 'file-item' and added 20.02 split-string function.
703ef56b7eb6 Attempted to reconcile Harald's changes with mine since 1.15.
Oliver Seidel <os10000@seidel-space.de>
parents: 20043
diff changeset
222 ;;
20043
fced838d50f4 Fixed 'file-item' and added 20.02 split-string function.
Oliver Seidel <os10000@seidel-space.de>
parents: 20042
diff changeset
223 ;; Revision 1.15 1997/10/14 22:22:35 os10000
fced838d50f4 Fixed 'file-item' and added 20.02 split-string function.
Oliver Seidel <os10000@seidel-space.de>
parents: 20042
diff changeset
224 ;; Added string-split (which I stole from ediff-util), changed
fced838d50f4 Fixed 'file-item' and added 20.02 split-string function.
Oliver Seidel <os10000@seidel-space.de>
parents: 20042
diff changeset
225 ;; pop-to-buffer to switch-to-buffer and added message on how
fced838d50f4 Fixed 'file-item' and added 20.02 split-string function.
Oliver Seidel <os10000@seidel-space.de>
parents: 20042
diff changeset
226 ;; to exit the multi-line-edit mode.
fced838d50f4 Fixed 'file-item' and added 20.02 split-string function.
Oliver Seidel <os10000@seidel-space.de>
parents: 20042
diff changeset
227 ;;
20042
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
228 ;; Revision 1.14 1997/10/09 09:24:50 os10000
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
229 ;; Harald Meland <harald.meland@usit.uio.no> asked for
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
230 ;; the latest version, got 1.13, and returned this.
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
231 ;; He writes:
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
232 ;;
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
233 ;; Thanks a lot for the new version of todo-mode.el. As you will see I
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
234 ;; have messed it up a bit, hopefully for the better -- I don't like
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
235 ;; short, cryptic names for variables and functions, so I renamed most of
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
236 ;; them, and `defalias'ed the old function names. I hope you don't mind
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
237 ;; too much, I just kinda couldn't stop myself.
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
238 ;;
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
239 ;; Additionally, I included some support for multiline entries, cleaned
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
240 ;; up (IMHO :) a lot of the code, included completion-support for which
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
241 ;; category to install a new entry in, and possibly some other changes I
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
242 ;; can't remember :)
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
243 ;;
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
244 ;; It's getting rather late, and I have just done some preliminary
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
245 ;; testing on whether all of this really works, but so far it looks
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
246 ;; good.
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
247 ;;
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
248 ;; Revision 1.13 1997/08/19 14:00:36 seidel
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
249 ;; - changed name to todo-mode
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
250 ;; - fixed menu descriptions
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
251 ;; - fixed "pressing abort while filing"
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
252 ;; - attempted Emacs Lisp Manual *Tips* section compliance
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
253 ;;
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
254 ;; Revision 1.12 1997/08/06 10:56:15 os10000
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
255 ;; Fixed header, typos, layout, documentation.
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
256 ;;
19189
1519cf07cfab Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents: 19188
diff changeset
257 ;; Revision 1.11 1997/08/06 09:14:25 os10000
1519cf07cfab Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents: 19188
diff changeset
258 ;; Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
1519cf07cfab Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents: 19188
diff changeset
259 ;; to make menus work anywhere.
1519cf07cfab Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents: 19188
diff changeset
260 ;;
19188
56e1d94a7083 Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents: 19187
diff changeset
261 ;; Revision 1.10 1997/08/06 08:56:03 os10000
56e1d94a7083 Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents: 19187
diff changeset
262 ;; Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
56e1d94a7083 Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents: 19187
diff changeset
263 ;; Cancelling the editing of an entry will not delete it any more.
56e1d94a7083 Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents: 19187
diff changeset
264 ;;
19187
9d37b4ab16b5 Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents: 19186
diff changeset
265 ;; Revision 1.9 1997/08/06 08:12:03 os10000
9d37b4ab16b5 Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents: 19186
diff changeset
266 ;; Improved documentation. Broke some lines to comply with
9d37b4ab16b5 Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents: 19186
diff changeset
267 ;; Richard Stallman's email to please keep in sync with the
9d37b4ab16b5 Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents: 19186
diff changeset
268 ;; rest of the Emacs distribution files.
9d37b4ab16b5 Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents: 19186
diff changeset
269 ;;
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
270 ;; Revision 1.8 1997/08/05 22:39:04 os10000
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
271 ;; Made todo-mode.el available under GPL.
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
272 ;;
19180
5de82ccd80eb Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents: 19179
diff changeset
273 ;; Revision 1.7 1997/08/05 22:34:14 os10000
5de82ccd80eb Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents: 19179
diff changeset
274 ;; Fixed insertion routine with help from Trey Jackson
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
275 ;; <trey@cs.berkeley.edu>; added todo-inst-tresh;
19180
5de82ccd80eb Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents: 19179
diff changeset
276 ;; fixed keyboard layout to remove unwanted keys.
5de82ccd80eb Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents: 19179
diff changeset
277 ;;
19179
dce72c66de1e Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents: 19166
diff changeset
278 ;; Revision 1.6 1997/08/05 16:47:01 os10000
dce72c66de1e Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents: 19166
diff changeset
279 ;; Incorporated menus for XEmacs from Allan.Cochrane@soton.sc.philips.com,
dce72c66de1e Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents: 19166
diff changeset
280 ;; fixed TYPO, fixed todo-file-cmd, cleaned up rcs history.
dce72c66de1e Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents: 19166
diff changeset
281 ;;
19166
8af428cb3906 Incorporated menus for XEmacs from Allan.Cochrane@soton.sc.philips.com,
Oliver Seidel <os10000@seidel-space.de>
parents: 19165
diff changeset
282 ;; Revision 1.5 1997/08/05 14:43:39 os10000
8af428cb3906 Incorporated menus for XEmacs from Allan.Cochrane@soton.sc.philips.com,
Oliver Seidel <os10000@seidel-space.de>
parents: 19165
diff changeset
283 ;; Added improvements from Ron Gut <rgut@aware.com>.
8af428cb3906 Incorporated menus for XEmacs from Allan.Cochrane@soton.sc.philips.com,
Oliver Seidel <os10000@seidel-space.de>
parents: 19165
diff changeset
284 ;; Added category management.
8af428cb3906 Incorporated menus for XEmacs from Allan.Cochrane@soton.sc.philips.com,
Oliver Seidel <os10000@seidel-space.de>
parents: 19165
diff changeset
285 ;;
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
286 ;; Revision 1.4 1997/08/04 16:18:45 os10000
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
287 ;; Added Raise/Lower item.
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
288 ;;
19143
96a5705f73d5 Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents: 19102
diff changeset
289 ;; Revision 1.3 1997/08/03 12:47:26 os10000
96a5705f73d5 Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents: 19102
diff changeset
290 ;; Cleaned up variables, prefix and cursor position.
96a5705f73d5 Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents: 19102
diff changeset
291 ;;
19102
b605b8dbb880 Cleaned up variables, prefix and cursor position.
Oliver Seidel <os10000@seidel-space.de>
parents: 19101
diff changeset
292 ;; Revision 1.2 1997/08/03 12:15:28 os10000
b605b8dbb880 Cleaned up variables, prefix and cursor position.
Oliver Seidel <os10000@seidel-space.de>
parents: 19101
diff changeset
293 ;; It appears to work.
b605b8dbb880 Cleaned up variables, prefix and cursor position.
Oliver Seidel <os10000@seidel-space.de>
parents: 19101
diff changeset
294 ;;
19101
31ba6200863a It appears to work.
Oliver Seidel <os10000@seidel-space.de>
parents: 19100
diff changeset
295 ;; Revision 1.1 1997/08/03 12:15:13 os10000
31ba6200863a It appears to work.
Oliver Seidel <os10000@seidel-space.de>
parents: 19100
diff changeset
296 ;; Initial revision
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
297 ;;
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
298
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
299 ;; ---------------------------------------------------------------------------
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
300
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
301 ;;; Code:
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
302
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
303 ;; User-configurable variables:
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
304
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
305 (defvar todo-prefix "*/*" "*TODO mode prefix for entries.")
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
306 (defvar todo-file-do "~/.todo-do" "*TODO mode list file.")
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
307 (defvar todo-file-done "~/.todo-done" "*TODO mode archive file.")
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
308 (defvar todo-mode-hook nil "*TODO mode hooks.")
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
309 (defvar todo-edit-mode-hook nil "*TODO Edit mode hooks.")
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
310 (defvar todo-insert-threshold 0 "*TODO mode insertion accuracy.")
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
311 (defvar todo-edit-buffer " *TODO Edit*" "TODO Edit buffer name.")
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
312
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
313 ;; Thanks for the ISO time stamp format go to Karl Eichwalder <ke@suse.de>
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
314 ;; My format string for the appt.el package is "%3b %2d, %y, %02I:%02M%p".
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
315 ;;
20045
cf048b490803 Everything seems to work in Harald Melands Emacs 20.02 and
Oliver Seidel <os10000@seidel-space.de>
parents: 20044
diff changeset
316 (defvar todo-time-string-format
cf048b490803 Everything seems to work in Harald Melands Emacs 20.02 and
Oliver Seidel <os10000@seidel-space.de>
parents: 20044
diff changeset
317 "%:y-%02m-%02d %02H:%02M"
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
318 "TODO mode time string format for done entries.
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
319 For details see the variable `time-stamp-format'.")
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
320
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
321 ;; ---------------------------------------------------------------------------
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
322
19188
56e1d94a7083 Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents: 19187
diff changeset
323 ;; Get some outside help ...
56e1d94a7083 Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents: 19187
diff changeset
324
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
325 (require 'time-stamp)
19188
56e1d94a7083 Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents: 19187
diff changeset
326 (require 'easymenu)
56e1d94a7083 Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents: 19187
diff changeset
327
56e1d94a7083 Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents: 19187
diff changeset
328 ;; ---------------------------------------------------------------------------
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
329
19189
1519cf07cfab Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents: 19188
diff changeset
330 ;; Set up some helpful context ...
1519cf07cfab Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents: 19188
diff changeset
331
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
332 (defvar todo-categories nil "TODO categories.")
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
333 (defvar todo-cats nil
20044
703ef56b7eb6 Attempted to reconcile Harald's changes with mine since 1.15.
Oliver Seidel <os10000@seidel-space.de>
parents: 20043
diff changeset
334 "Old variable for holding the TODO categories. Use `todo-categories' instead.")
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
335 (defvar todo-previous-line 0 "Previous line that I asked about.")
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
336 (defvar todo-previous-answer 0 "Previous answer that I got.")
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
337 (defvar todo-mode-map nil "TODO mode keymap.")
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
338 (defvar todo-category-number 0 "TODO category number.")
19189
1519cf07cfab Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents: 19188
diff changeset
339
1519cf07cfab Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents: 19188
diff changeset
340 ;; ---------------------------------------------------------------------------
1519cf07cfab Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents: 19188
diff changeset
341
19179
dce72c66de1e Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents: 19166
diff changeset
342 (if todo-mode-map
dce72c66de1e Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents: 19166
diff changeset
343 nil
dce72c66de1e Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents: 19166
diff changeset
344 (let ((map (make-keymap)))
dce72c66de1e Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents: 19166
diff changeset
345 (suppress-keymap map t)
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
346 (define-key map "+" 'todo-forward-category)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
347 (define-key map "-" 'todo-backward-category)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
348 (define-key map "e" 'todo-edit-item)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
349 (define-key map "E" 'todo-edit-multiline)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
350 (define-key map "f" 'todo-file-item)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
351 (define-key map "i" 'todo-insert-item)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
352 (define-key map "k" 'todo-delete-item)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
353 (define-key map "l" 'todo-lower-item)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
354 (define-key map "n" 'todo-forward-item)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
355 (define-key map "p" 'todo-backward-item)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
356 (define-key map "q" 'todo-quit)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
357 (define-key map "r" 'todo-raise-item)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
358 (define-key map "s" 'todo-save)
19179
dce72c66de1e Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents: 19166
diff changeset
359 (setq todo-mode-map map)))
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
360
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
361 (defun todo-category-select ()
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
362 "Make TODO mode display the current category correctly."
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
363 (let ((name (nth todo-category-number todo-categories)))
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
364 (setq mode-line-buffer-identification
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
365 (concat "Category: " name))
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
366 (widen)
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
367 (goto-char (point-min))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
368 (search-forward-regexp
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
369 (concat "^" (regexp-quote (concat todo-prefix " --- " name))))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
370 (let ((begin (1+ (point-at-eol))))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
371 (search-forward-regexp "^--- End")
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
372 (narrow-to-region begin (point-at-bol))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
373 (goto-char (point-min)))))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
374 (defalias 'todo-cat-slct 'todo-category-select)
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
375
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
376 (defun todo-forward-category () "Go forward to TODO list of next category."
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
377 (interactive)
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
378 (setq todo-category-number
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
379 (mod (1+ todo-category-number) (length todo-categories)))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
380 (todo-category-select))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
381 (defalias 'todo-cmd-forw 'todo-forward-category)
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
382
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
383 (defun todo-backward-category () "Go back to TODO list of previous category."
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
384 (interactive)
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
385 (setq todo-category-number
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
386 (mod (1- todo-category-number) (length todo-categories)))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
387 (todo-category-select))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
388 (defalias 'todo-cmd-back 'todo-backward-category)
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
389
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
390 (defun todo-backward-item () "Select previous entry of TODO list."
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
391 (interactive)
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
392 (search-backward-regexp (concat "^" (regexp-quote todo-prefix)) nil t)
19189
1519cf07cfab Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents: 19188
diff changeset
393 (message ""))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
394 (defalias 'todo-cmd-prev 'todo-backward-item)
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
395
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
396 (defun todo-forward-item () "Select next entry of TODO list."
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
397 (interactive)
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
398 (end-of-line)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
399 (search-forward-regexp (concat "^" (regexp-quote todo-prefix)) nil 'goto-end)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
400 (beginning-of-line)
19189
1519cf07cfab Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents: 19188
diff changeset
401 (message ""))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
402 (defalias 'todo-cmd-next 'todo-forward-item)
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
403
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
404 (defun todo-save () "Save the TODO list."
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
405 (interactive)
19189
1519cf07cfab Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents: 19188
diff changeset
406 (save-buffer))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
407 (defalias 'todo-cmd-save 'todo-save)
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
408
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
409 (defun todo-quit () "Done with TODO list for now."
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
410 (interactive)
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
411 (widen)
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
412 (save-buffer)
19102
b605b8dbb880 Cleaned up variables, prefix and cursor position.
Oliver Seidel <os10000@seidel-space.de>
parents: 19101
diff changeset
413 (message "")
19189
1519cf07cfab Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents: 19188
diff changeset
414 (bury-buffer))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
415 (defalias 'todo-cmd-done 'todo-quit)
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
416
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
417 (defun todo-edit-item () "Edit current TODO list entry."
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
418 (interactive)
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
419 (let ((item (todo-item-string)))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
420 (if (todo-string-multiline-p item)
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
421 (todo-edit-multiline)
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
422 (let ((new (read-from-minibuffer "Edit: " item)))
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
423 (todo-remove-item)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
424 (insert new "\n")
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
425 (todo-backward-item)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
426 (message "")))))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
427 (defalias 'todo-cmd-edit 'todo-edit-item)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
428
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
429 (defun todo-edit-multiline ()
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
430 "Set up a buffer for editing a multiline TODO list entry."
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
431 (interactive)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
432 (let ((buffer-name (generate-new-buffer-name todo-edit-buffer)))
20042
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
433 (switch-to-buffer (make-indirect-buffer (file-name-nondirectory todo-file-do)
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
434 buffer-name))
20042
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
435 (message "To exit, simply kill this buffer and return to list.")
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
436 (todo-edit-mode)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
437 (narrow-to-region (todo-item-start) (todo-item-end))))
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
438
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
439 (defun todo-add-category (cat) "Add a new category to the TODO list."
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
440 (interactive)
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
441 (save-window-excursion
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
442 (setq todo-categories (cons cat todo-categories))
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
443 (find-file todo-file-do)
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
444 (widen)
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
445 (goto-char (point-min))
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
446 (let ((posn (search-forward "-*- mode: todo; " 17 t)))
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
447 (if (not (null posn)) (goto-char posn))
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
448 (if (equal posn nil)
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
449 (progn
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
450 (insert "-*- mode: todo; \n")
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
451 (forward-char -1))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
452 (kill-line)))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
453 (insert (format "todo-categories: %S; -*-" todo-categories))
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
454 (forward-char 1)
19186
023404dbc696 Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents: 19180
diff changeset
455 (insert (format "%s --- %s\n--- End\n%s %s\n"
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
456 todo-prefix cat todo-prefix (make-string 75 ?-))))
19189
1519cf07cfab Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents: 19188
diff changeset
457 0)
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
458
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
459 (defun todo-insert-item ()
19179
dce72c66de1e Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents: 19166
diff changeset
460 "Insert new TODO list entry."
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
461 (interactive)
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
462 (let* ((new-item (concat todo-prefix " "
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
463 (read-from-minibuffer "New TODO entry: ")))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
464 (categories todo-categories)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
465 (history (cons 'categories (1+ todo-category-number)))
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
466 (category (completing-read "Category: "
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
467 (todo-category-alist) nil nil
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
468 (nth todo-category-number todo-categories)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
469 history)))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
470 (let ((cat-exists (member category todo-categories)))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
471 (setq todo-category-number
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
472 (if cat-exists
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
473 (- (length todo-categories) (length cat-exists))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
474 (todo-add-category category))))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
475 (todo-show)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
476 (setq todo-previous-line 0)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
477 (let ((top 1)
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
478 (bottom (1+ (count-lines (point-min) (point-max)))))
20045
cf048b490803 Everything seems to work in Harald Melands Emacs 20.02 and
Oliver Seidel <os10000@seidel-space.de>
parents: 20044
diff changeset
479 (while (> (- bottom top) todo-insert-threshold)
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
480 (let* ((current (/ (+ top bottom) 2))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
481 (answer (if (< current bottom)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
482 (todo-more-important-p current) nil)))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
483 (if answer
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
484 (setq bottom current)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
485 (setq top (1+ current)))))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
486 (setq top (/ (+ top bottom) 2))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
487 ;; goto-line doesn't have the desired behavior in a narrowed buffer
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
488 (goto-char (point-min))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
489 (forward-line (1- top)))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
490 (insert new-item "\n")
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
491 (todo-backward-item)
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
492 (save-buffer)
19179
dce72c66de1e Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents: 19166
diff changeset
493 (message "")))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
494 (defalias 'todo-cmd-inst 'todo-insert-item)
19179
dce72c66de1e Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents: 19166
diff changeset
495
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
496 (defun todo-more-important-p (line)
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
497 "Ask whether entry is more important than the one at LINE."
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
498 (if (not (equal todo-previous-line line))
19179
dce72c66de1e Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents: 19166
diff changeset
499 (progn
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
500 (setq todo-previous-line line)
19179
dce72c66de1e Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents: 19166
diff changeset
501 (goto-char (point-min))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
502 (forward-line (1- todo-previous-line))
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
503 (let ((item (todo-item-string-start)))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
504 (setq todo-previous-answer
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
505 (y-or-n-p (concat "More important than '" item "'? "))))))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
506 todo-previous-answer)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
507 (defalias 'todo-ask-p 'todo-more-important-p)
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
508
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
509 (defun todo-delete-item () "Delete current TODO list entry."
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
510 (interactive)
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
511 (if (> (count-lines (point-min) (point-max)) 0)
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
512 (let* ((todo-entry (todo-item-string-start))
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
513 (todo-answer (y-or-n-p (concat "Permanently remove '"
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
514 todo-entry "'? "))))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
515 (if todo-answer
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
516 (progn
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
517 (todo-remove-item)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
518 (todo-backward-item)))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
519 (message ""))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
520 (error "No TODO list entry to delete")))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
521 (defalias 'todo-cmd-kill 'todo-delete-item)
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
522
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
523 (defun todo-raise-item () "Raise priority of current entry."
19143
96a5705f73d5 Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents: 19102
diff changeset
524 (interactive)
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
525 (if (> (count-lines (point-min) (point)) 0)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
526 (let ((item (todo-item-string)))
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
527 (todo-remove-item)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
528 (todo-backward-item)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
529 (save-excursion
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
530 (insert item "\n"))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
531 (message ""))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
532 (error "No TODO list entry to raise")))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
533 (defalias 'todo-cmd-rais 'todo-raise-item)
19143
96a5705f73d5 Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents: 19102
diff changeset
534
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
535 (defun todo-lower-item () "Lower priority of current entry."
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
536 (interactive)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
537 (if (> (count-lines (point) (point-max)) 1) ; Assume there is a final newline
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
538 (let ((item (todo-item-string)))
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
539 (todo-remove-item)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
540 (todo-forward-item)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
541 (save-excursion
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
542 (insert item "\n"))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
543 (message ""))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
544 (error "No TODO list entry to lower")))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
545 (defalias 'todo-cmd-lowr 'todo-lower-item)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
546
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
547 (defun todo-file-item () "File the current TODO list entry away."
19143
96a5705f73d5 Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents: 19102
diff changeset
548 (interactive)
96a5705f73d5 Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents: 19102
diff changeset
549 (if (> (count-lines (point-min) (point-max)) 0)
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
550 (let ((comment (read-from-minibuffer "Comment: "))
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
551 (time-stamp-format todo-time-string-format))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
552 (if (> (length comment) 0)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
553 (progn
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
554 (goto-char (todo-item-end))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
555 (insert (if (save-excursion (beginning-of-line)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
556 (looking-at (regexp-quote todo-prefix)))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
557 " "
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
558 "\n\t")
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
559 "(" (nth todo-category-number todo-categories) ": "
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
560 comment ")\n")))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
561 (goto-char (todo-item-start))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
562 (let ((temp-point (point)))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
563 (if (looking-at (regexp-quote todo-prefix))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
564 (replace-match (time-stamp-string)) ; Standard prefix -> timestamp
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
565 ;; Else prefix non-standard item start with timestamp
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
566 (insert (time-stamp-string)))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
567 (append-to-file temp-point (todo-item-end) todo-file-done)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
568 (delete-region temp-point (1+ (todo-item-end))))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
569 (todo-backward-item)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
570 (message ""))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
571 (error "No TODO list entry to file away")))
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
572
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
573 ;; ---------------------------------------------------------------------------
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
574
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
575 ;; Utility functions:
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
576
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
577 (defun todo-line-string () "Return current line in buffer as a string."
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
578 (buffer-substring (point-at-bol) (point-at-eol)))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
579
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
580 (defun todo-item-string-start ()
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
581 "Return the start of this TODO list entry as a string."
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
582 ;; Suitable for putting in the minibuffer when asking the user
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
583 (let ((item (todo-item-string)))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
584 (if (> (length item) 60)
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
585 (setq item (concat (substring item 0 56) "...")))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
586 item))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
587
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
588 (defun todo-item-start () "Return point at start of current TODO list item."
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
589 (save-excursion
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
590 (beginning-of-line)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
591 (if (not (looking-at (regexp-quote todo-prefix)))
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
592 (search-backward-regexp
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
593 (concat "^" (regexp-quote todo-prefix)) nil t))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
594 (point)))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
595
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
596 (defun todo-item-end () "Return point at end of current TODO list item."
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
597 (save-excursion
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
598 (end-of-line)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
599 (search-forward-regexp (concat "^" (regexp-quote todo-prefix)) nil 'goto-end)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
600 (1- (point-at-bol))))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
601
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
602 (defun todo-remove-item () "Delete the current entry from the TODO list."
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
603 (delete-region (todo-item-start) (1+ (todo-item-end))))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
604
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
605 (defun todo-item-string () "Return current TODO list entry as a string."
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
606 (buffer-substring (todo-item-start) (todo-item-end)))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
607
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
608 (defun todo-string-count-lines (string)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
609 "Return the number of lines STRING spans."
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
610 (length (split-string string "\n")))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
611
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
612 (defun todo-string-multiline-p (string)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
613 "Returns non-nil if STRING spans several lines"
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
614 (> (todo-string-count-lines string) 1))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
615
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
616 (defun todo-category-alist ()
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
617 "Generate an alist fro use in `completing-read' from `todo-categories'"
20044
703ef56b7eb6 Attempted to reconcile Harald's changes with mine since 1.15.
Oliver Seidel <os10000@seidel-space.de>
parents: 20043
diff changeset
618 (mapcar (lambda (cat) (cons cat nil))
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
619 todo-categories))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
620
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
621 ;; utility functions: These are available in XEmacs, but not in Emacs 19.34
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
622
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
623 (if (not (fboundp 'point-at-bol))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
624 (defun point-at-bol () "Return value of point at beginning of line."
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
625 (save-excursion
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
626 (beginning-of-line)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
627 (point))))
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
628
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
629 (if (not (fboundp 'point-at-eol))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
630 (defun point-at-eol () "Return value of point at end of line."
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
631 (save-excursion
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
632 (end-of-line)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
633 (point))))
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
634
20042
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
635 ;; splits at a white space, returns a list
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
636 (if (not (fboundp 'split-string))
20043
fced838d50f4 Fixed 'file-item' and added 20.02 split-string function.
Oliver Seidel <os10000@seidel-space.de>
parents: 20042
diff changeset
637 (defun split-string (string &optional separators)
fced838d50f4 Fixed 'file-item' and added 20.02 split-string function.
Oliver Seidel <os10000@seidel-space.de>
parents: 20042
diff changeset
638 "Splits STRING into substrings where there are matches for SEPARATORS.
fced838d50f4 Fixed 'file-item' and added 20.02 split-string function.
Oliver Seidel <os10000@seidel-space.de>
parents: 20042
diff changeset
639 Each match for SEPARATORS is a splitting point.
fced838d50f4 Fixed 'file-item' and added 20.02 split-string function.
Oliver Seidel <os10000@seidel-space.de>
parents: 20042
diff changeset
640 The substrings between the splitting points are made into a list
fced838d50f4 Fixed 'file-item' and added 20.02 split-string function.
Oliver Seidel <os10000@seidel-space.de>
parents: 20042
diff changeset
641 which is returned.
fced838d50f4 Fixed 'file-item' and added 20.02 split-string function.
Oliver Seidel <os10000@seidel-space.de>
parents: 20042
diff changeset
642 If SEPARATORS is absent, it defaults to \"[ \\f\\t\\n\\r\\v]+\"."
fced838d50f4 Fixed 'file-item' and added 20.02 split-string function.
Oliver Seidel <os10000@seidel-space.de>
parents: 20042
diff changeset
643 (let ((rexp (or separators "[ \f\t\n\r\v]+"))
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
644 (start 0)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
645 (list nil))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
646 (while (string-match rexp string start)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
647 (or (eq (match-beginning 0) 0)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
648 (setq list
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
649 (cons (substring string start (match-beginning 0))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
650 list)))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
651 (setq start (match-end 0)))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
652 (or (eq start (length string))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
653 (setq list
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
654 (cons (substring string start)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
655 list)))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
656 (nreverse list))))
20042
691f7e0ee17d Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents: 20028
diff changeset
657
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
658 ;; ---------------------------------------------------------------------------
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
659
19188
56e1d94a7083 Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents: 19187
diff changeset
660 (easy-menu-define todo-menu todo-mode-map "Todo Menu"
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
661 '("Todo"
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
662 ["Next category" todo-forward-category t]
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
663 ["Previous category" todo-backward-category t]
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
664 "---"
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
665 ["Edit item" todo-edit-item t]
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
666 ["File item" todo-file-item t]
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
667 ["Insert new item" todo-insert-item t]
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
668 ["Kill item" todo-delete-item t]
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
669 "---"
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
670 ["Lower item priority" todo-lower-item t]
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
671 ["Raise item priority" todo-raise-item t]
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
672 "---"
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
673 ["Next item" todo-forward-item t]
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
674 ["Previous item" todo-backward-item t]
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
675 "---"
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
676 ["Save" todo-save t]
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
677 "---"
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
678 ["Quit" todo-quit t]
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
679 ))
19166
8af428cb3906 Incorporated menus for XEmacs from Allan.Cochrane@soton.sc.philips.com,
Oliver Seidel <os10000@seidel-space.de>
parents: 19165
diff changeset
680
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
681 (defun todo-mode () "Major mode for editing TODO lists.\n\n\\{todo-mode-map}"
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
682 (interactive)
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
683 (setq major-mode 'todo-mode)
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
684 (setq mode-name "TODO")
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
685 (use-local-map todo-mode-map)
19188
56e1d94a7083 Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents: 19187
diff changeset
686 (easy-menu-add todo-menu)
56e1d94a7083 Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents: 19187
diff changeset
687 (run-hooks 'todo-mode-hook))
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
688
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
689 (defun todo-edit-mode ()
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
690 "Major mode for editing items in the TODO list\n\n\\{todo-edit-mode-map}"
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
691 (text-mode)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
692 (setq major-mode 'todo-edit-mode)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
693 (setq mode-name "TODO Edit")
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
694 (run-hooks 'todo-edit-mode-hook))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
695
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
696 (defun todo-show () "Show TODO list."
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
697 (interactive)
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
698 (if (file-exists-p todo-file-do)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
699 (find-file todo-file-do)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
700 (todo-initial-setup))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
701 (if (null todo-categories)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
702 (if (null todo-cats)
20084
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
703 (error "Error in %s: No categories in list `todo-categories'"
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
704 todo-file-do)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
705 (goto-char (point-min))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
706 (and (search-forward "todo-cats:" nil t)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
707 (replace-match "todo-categories:"))
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
708 (make-local-variable todo-categories)
c97d281f1bd2 Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents: 20045
diff changeset
709 (setq todo-categories todo-cats)))
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
710 (beginning-of-line)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
711 (todo-category-select))
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
712
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
713 (defun todo-initial-setup () "Set up things to work properly in TODO mode."
19165
9bf7fc374b58 Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents: 19143
diff changeset
714 (find-file todo-file-do)
20028
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
715 (erase-buffer)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
716 (todo-mode)
a5846414f380 Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents: 19436
diff changeset
717 (todo-add-category "Todo"))
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
718
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
719 (provide 'todo-mode)
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
720
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
721 ;; ---------------------------------------------------------------------------
19436
38aa295db414 - changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents: 19189
diff changeset
722 ;;; todo-mode.el ends here
19100
0cbf5673993f Initial revision
Oliver Seidel <os10000@seidel-space.de>
parents:
diff changeset
723 ;; ---------------------------------------------------------------------------