Mercurial > emacs
annotate lisp/calendar/todo-mode.el @ 24561:6f4ae209bbac
(dumpglyphs): Be sure to fill the whole background of
glyphs.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 05 Apr 1999 06:47:41 +0000 |
parents | 1e30ade63ed3 |
children | 71c05fbebaba |
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 | 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 | 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 |
24500
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
7 ;; Version: $Id: todo-mode.el,v 1.36 1999/03/17 11:10:29 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 |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
31 ;; Mode Description |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
32 ;; |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
33 ;; TODO is a major mode for EMACS which offers functionality to |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
34 ;; treat most lines in one buffer as a list of items one has to |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
35 ;; do. There are facilities to add new items, which are |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
36 ;; categorised, to edit or even delete items from the buffer. |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
37 ;; The buffer contents are currently compatible with the diary, |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
38 ;; so that the list of todo-items will show up in the FANCY diary |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
39 ;; mode. |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
40 ;; |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
41 ;; Notice: Besides the major mode, this file also exports the |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
42 ;; function `todo-show' which will change to the one specific |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
43 ;; TODO file that has been specified in the todo-file-do |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
44 ;; variable. If this file does not conform to the TODO mode |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
45 ;; conventions, the todo-show function will add the appropriate |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
46 ;; header and footer. I don't anticipate this to cause much |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
47 ;; grief, but be warned, in case you attempt to read a plain text |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
48 ;; file. |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
49 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
50 ;; Preface, Quickstart Installation |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
51 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
52 ;; To get this to work, make emacs execute the line |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
53 ;; |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
54 ;; (autoload 'todo-mode "todo-mode" |
20173
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
55 ;; "Major mode for editing TODO lists." t) |
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
56 ;; (autoload 'todo-show "todo-mode" |
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
57 ;; "Show TODO items." t) |
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
58 ;; (autoload 'todo-insert-item "todo-mode" |
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
59 ;; "Add TODO item." t) |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
60 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
61 ;; You may now enter new items by typing "M-x todo-insert-item", |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
62 ;; or enter your TODO list file by typing "M-x todo-show". |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
63 ;; |
23349
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
64 ;; ------------------------------------------------------------- |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
65 ;; |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
66 ;; oh no, it doesn't work any more ... but Alex Schroeder |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
67 ;; <a.schroeder@bsiag.ch> writes: |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
68 ;; |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
69 ;; ------------------------------------------------------------- |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
70 ;; |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
71 ;; 1. Call todo-show (I called todo-insert first) |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
72 ;; 2. Add some categories (I called todo-insert) |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
73 ;; 3. Save the buffer, restart Emacs (perhaps restarting Emacs is not |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
74 ;; required) |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
75 ;; 4. Only now can you start to add entries. |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
76 ;; |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
77 ;; This is a bit cumbersome, and it should be documented. You probably |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
78 ;; |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
79 ;; ------------------------------------------------------------- |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
80 ;; |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
81 ;; and right he is. My apologies, I'll try to fix it sometime. |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
82 ;; |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
83 ;; ------------------------------------------------------------- |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
84 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
85 ;; The TODO list file has a special format and some auxiliary |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
86 ;; information, which will be added by the todo-show function if |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
87 ;; it attempts to visit an un-initialised file. Hence it is |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
88 ;; recommended to use the todo-show function for the first time, |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
89 ;; in order to initialise the file, but it is not necessary |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
90 ;; afterwards. |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
91 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
92 ;; As these commands are quite long to type, I would recommend |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
93 ;; the addition of two bindings to your to your global keymap. I |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
94 ;; personally have the following in my initialisation file: |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
95 ;; |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
96 ;; (global-set-key "\C-ct" 'todo-show) ;; switch to TODO buffer |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
97 ;; (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
|
98 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
99 ;; Note, however, that this recommendation has prompted some |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
100 ;; criticism, since the keys C-c LETTER are reserved for user |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
101 ;; functions. I believe my recommendation is acceptable, since |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
102 ;; the Emacs Lisp Manual *Tips* section also details that the |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
103 ;; mode itself should not bind any functions to those keys. The |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
104 ;; express aim of the above two bindings is to work outside the |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
105 ;; mode, which doesn't need the show function and offers a |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
106 ;; different binding for the insert function. They serve as |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
107 ;; shortcuts and are not even needed (since the TODO mode will be |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
108 ;; entered by visiting the TODO file, and later by switching to |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
109 ;; its buffer). |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
110 ;; |
20196
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
111 ;; If you are an advanced user of this package, please consult |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
112 ;; the whole source code for autoloads, because there are several |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
113 ;; extensions that are not explicitly listed in the above quick |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
114 ;; installation. |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
115 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
116 ;; Version |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
117 ;; |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
118 ;; Which version of todo-mode.el does this documentation refer to? |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
119 ;; |
24500
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
120 ;; $Id: todo-mode.el,v 1.36 1999/03/17 11:10:29 os10000 Exp os10000 $ |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
121 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
122 ;; Pre-Requisites |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
123 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
124 ;; This package will require the following packages to be |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
125 ;; available on the load-path: |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
126 ;; |
24494
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
127 ;; cl |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
128 ;; custom |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
129 ;; easymenu |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
130 ;; time-stamp |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
131 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
132 ;; Operation |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
133 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
134 ;; 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
|
135 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
136 ;; 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
|
137 ;; |
24494
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
138 ;; spc will toggle the display of sub-trees |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
139 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
140 ;; + to go to next category |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
141 ;; - to go to previous category |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
142 ;; d to file the current entry, including a |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
143 ;; comment and timestamp |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
144 ;; e to edit the current entry |
20198
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
145 ;; E to edit a multi-line entry |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
146 ;; 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
|
147 ;; comment and timestamp |
20199
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
148 ;; i to insert a new entry, with prefix, omit category |
20198
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
149 ;; I to insert a new entry at current cursor position |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
150 ;; j jump to category |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
151 ;; 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
|
152 ;; 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
|
153 ;; n for the next entry |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
154 ;; p for the previous entry |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
155 ;; P print |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
156 ;; 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
|
157 ;; 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
|
158 ;; s to save the list |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
159 ;; S to save the list of top priorities |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
160 ;; t show top priority items for each category |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
161 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
162 ;; When you add a new entry, you are asked for the text and then |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
163 ;; for the category. I for example have categories for things |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
164 ;; that I want to do in the office (like mail my mum), that I |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
165 ;; want to do in town (like buy cornflakes) and things I want to |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
166 ;; do at home (move my suitcases). The categories can be |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
167 ;; selected with the cursor keys and if you type in the name of a |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
168 ;; category which didn't exist before, an empty category of the |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
169 ;; desired name will be added and 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
|
170 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
171 ;; Configuration |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
172 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
173 ;; Variable todo-prefix |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
174 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
175 ;; I would like to recommend that you use the prefix "*/*" (by |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
176 ;; leaving the variable 'todo-prefix' untouched) so that the |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
177 ;; diary 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
|
178 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
179 ;; To understand what I mean, please read the documentation that |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
180 ;; goes with the calendar since that will tell you how you can |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
181 ;; set up the fancy diary display and use the #include command to |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
182 ;; include your 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
|
183 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
184 ;; If you have the diary package set up to usually display more |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
185 ;; than 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
|
186 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
187 ;; "&%%(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
|
188 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
189 ;; as the value of `todo-prefix'. Please note that this may slow |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
190 ;; down 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
|
191 ;; |
20196
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
192 ;; Carsten Dominik <dominik@strw.LeidenUniv.nl> suggested that |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
193 ;; |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
194 ;; "&%%(todo-cp)" |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
195 ;; |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
196 ;; might be nicer and to that effect a function has been declared |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
197 ;; further down in the code. You may wish to auto-load this. |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
198 ;; |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
199 ;; Carsten also writes that that *changing* the prefix after the |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
200 ;; todo list is already established is not as simple as changing |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
201 ;; the variable - the todo files have to be changed by hand. |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
202 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
203 ;; Variable todo-file-do |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
204 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
205 ;; This variable is fairly self-explanatory. You have to store |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
206 ;; your TODO list somewhere. This variable tells the package |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
207 ;; where to go and find this file. |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
208 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
209 ;; Variable todo-file-done |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
210 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
211 ;; Even when you're done, you may wish to retain the entries. |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
212 ;; Given that they're timestamped and you are offered to add a |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
213 ;; comment, this can make a useful diary of past events. It will |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
214 ;; even blend in with the EMACS diary package. So anyway, this |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
215 ;; variable holds the name 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
|
216 ;; |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
217 ;; Variable todo-file-top |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
218 ;; |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
219 ;; File storing the top priorities of your TODO list when |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
220 ;; todo-save-top-priorities is non-nil. Nice to include in your |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
221 ;; diary instead of the complete TODO list. |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
222 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
223 ;; Variable todo-mode-hook |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
224 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
225 ;; Just like other modes, too, this mode offers to call your |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
226 ;; functions before it goes about its business. This variable |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
227 ;; will be inspected for any functions you may wish to have |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
228 ;; called once the other TODO mode preparations have been |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
229 ;; completed. |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
230 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
231 ;; Variable todo-insert-threshold |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
232 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
233 ;; Another nifty feature is the insertion accuracy. If you have |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
234 ;; 8 items in your TODO list, then you may get asked 4 questions |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
235 ;; by the binary insertion algorithm. However, you may not |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
236 ;; really have a need for such accurate priorities amongst your |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
237 ;; TODO items. If you now think about the binary insertion |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
238 ;; halfing the size of the window each time, then the threshhold |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
239 ;; is the window size at which it will stop. If you set the |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
240 ;; threshhold to zero, the upper and lower bound will coincide at |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
241 ;; the end of the loop and you will insert your item just before |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
242 ;; that point. If you set the threshhold to, e.g. 8, it will stop |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
243 ;; as soon as the window size drops below that amount and will |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
244 ;; insert the item in the approximate centre of that window. I |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
245 ;; got the idea for this feature after reading a very helpful |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
246 ;; e-mail reply from Trey Jackson <trey@cs.berkeley.edu> who |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
247 ;; corrected some of my awful coding and pointed me towards some |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
248 ;; good reading. Thanks Trey! |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
249 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
250 ;; Things to do |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
251 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
252 ;; These originally were my ideas, but now also include all the |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
253 ;; suggestions that I included before forgetting them: |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
254 ;; |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
255 ;; o Fancy fonts for todo/top-priority buffer |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
256 ;; o Remove todo-prefix option in todo-top-priorities |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
257 ;; o Rename category |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
258 ;; o Move entry from one category to another one |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
259 ;; o Entries which both have the generic */* prefix and a |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
260 ;; "deadline" entry which are understood by diary, indicating |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
261 ;; an event (unless marked by &) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
262 ;; o The optional COUNT variable of todo-forward-item should be |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
263 ;; applied to the other functions performing similar tasks |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
264 ;; o Modularization could be done for repeaded elements of |
23349
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
265 ;; the code, like the completing-read lines of code. |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
266 ;; o license / version function |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
267 ;; o export to diary file |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
268 ;; o todo-report-bug |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
269 ;; o GNATS support |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
270 ;; o elide multiline (as in bbdb, or, to a lesser degree, in |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
271 ;; outline mode) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
272 ;; o rewrite complete package to store data as lisp objects |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
273 ;; and have display modes for display, for diary export, |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
274 ;; etc. (Richard Stallman pointed out this is a bad idea) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
275 ;; o so 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
|
276 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
277 ;; History and Gossip |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
278 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
279 ;; Many thanks to all the ones who have contributed to the |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
280 ;; evolution of this package! I hope I have listed all of you |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
281 ;; somewhere in the 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
|
282 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
283 ;; Enjoy this package and express your gratitude by sending nice |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
284 ;; things to my parents' address! |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
285 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
286 ;; Oliver Seidel |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
287 ;; (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
|
288 ;; |
19180
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
289 |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
290 ;; --------------------------------------------------------------------------- |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
291 |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
292 ;;; Change Log: |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
293 |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
294 ;; $Log: todo-mode.el,v $ |
24500
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
295 ;; Revision 1.36 1999/03/17 11:10:29 os10000 |
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
296 ;; Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98 |
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
297 ;; which removes duplicates from the category list and saves the buffer |
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
298 ;; after category addition. Thanks. |
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
299 ;; |
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
300 ;; Uwe Brauer <oub@sunma4.mat.ucm.es> sent in a request on 3.Apr.98 to |
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
301 ;; implement a "move-between-categories" function. I haven't done that |
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
302 ;; yet. Thanks. |
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
303 ;; |
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
304 ;; "Edward S. Hirgelt" <ehirgelt@directinterfaces.com> fixed a problem |
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
305 ;; with multi-line editing 29.Oct.98. Thanks. |
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
306 ;; |
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
307 ;; tom <tom@pixelpark.com> sent in a replacement for the outmoded |
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
308 ;; time-format that I had been using on 13.Nov.98. Thanks. |
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
309 ;; |
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
310 ;; Jerome Thebert <thebertj@felixstowe.rms.slb.com> sent in a binding to |
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
311 ;; show/hide continuation lines using the space bar on 11.Jan.99. |
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
312 ;; Instead of leaving it as a hook, I integrated it. Thanks. |
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
313 ;; |
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
314 ;; Sorry again to everybody. I sat on your patches for a year. |
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
315 ;; |
24494
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
316 ;; Revision 1.35 1998/09/29 18:20:36 os10000 |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
317 ;; Alex Schroeder startup description added. |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
318 ;; |
23349
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
319 ;; Revision 1.34 1998/01/12 11:43:22 os10000 |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
320 ;; Added patch from Don Hejna <djhejna@oasis.ambit.com>. |
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
321 ;; |
20643
2a37005dcd69
Added patch from Don Hejna <djhejna@oasis.ambit.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
20419
diff
changeset
|
322 ;; Revision 1.33 1997/12/04 17:45:22 os10000 |
2a37005dcd69
Added patch from Don Hejna <djhejna@oasis.ambit.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
20419
diff
changeset
|
323 ;; Another patch by Michael Cook to fix annotation. |
2a37005dcd69
Added patch from Don Hejna <djhejna@oasis.ambit.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
20419
diff
changeset
|
324 ;; |
20419
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
325 ;; Revision 1.32 1997/12/03 12:18:20 os10000 |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
326 ;; Added category patch by Michael R Cook <mcook@cognex.com>. |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
327 ;; |
20388
fa0ae5cb8ab2
Added category patch by Michael R Cook <mcook@cognex.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
20199
diff
changeset
|
328 ;; Revision 1.31 1997/10/28 22:16:24 os10000 |
fa0ae5cb8ab2
Added category patch by Michael R Cook <mcook@cognex.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
20199
diff
changeset
|
329 ;; Three insertion options: |
fa0ae5cb8ab2
Added category patch by Michael R Cook <mcook@cognex.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
20199
diff
changeset
|
330 ;; i without prefix: ask for category, do binary insertion |
fa0ae5cb8ab2
Added category patch by Michael R Cook <mcook@cognex.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
20199
diff
changeset
|
331 ;; i with prefix: do binary insertion in current category |
fa0ae5cb8ab2
Added category patch by Michael R Cook <mcook@cognex.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
20199
diff
changeset
|
332 ;; uppercase I: insert directly under cursor |
fa0ae5cb8ab2
Added category patch by Michael R Cook <mcook@cognex.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
20199
diff
changeset
|
333 ;; |
20199
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
334 ;; Revision 1.30 1997/10/28 21:59:48 os10000 |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
335 ;; Improved documentation, fixed insertion with prefix. |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
336 ;; |
20198
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
337 ;; Revision 1.29 1997/10/28 21:47:12 os10000 |
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
338 ;; Implemented "insert-under-cursor" as suggested by |
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
339 ;; Kai Grossjohann <grossjohann@ls6.cs.uni-dortmund.de>. |
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
340 ;; |
20197
33e3febd442d
Implemented "insert-under-cursor" as suggested by
Oliver Seidel <os10000@seidel-space.de>
parents:
20196
diff
changeset
|
341 ;; Revision 1.28 1997/10/28 21:37:05 os10000 |
33e3febd442d
Implemented "insert-under-cursor" as suggested by
Oliver Seidel <os10000@seidel-space.de>
parents:
20196
diff
changeset
|
342 ;; Incorporated simplifying suggestions from |
33e3febd442d
Implemented "insert-under-cursor" as suggested by
Oliver Seidel <os10000@seidel-space.de>
parents:
20196
diff
changeset
|
343 ;; Carsten Dominik <dominik@strw.LeidenUniv.nl>. |
33e3febd442d
Implemented "insert-under-cursor" as suggested by
Oliver Seidel <os10000@seidel-space.de>
parents:
20196
diff
changeset
|
344 ;; |
20196
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
345 ;; Revision 1.27 1997/10/28 21:26:55 os10000 |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
346 ;; Patch from Paul Stodghill <stodghil@CS.Cornell.EDU>: |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
347 ;; The patch below fixes todo-insert-item so that it will |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
348 ;; insert the item in place, instead of at the top of the |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
349 ;; buffer, when invoked with a prefix argument. |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
350 ;; |
20195
c2017bcd6e9f
Patch from Paul Stodghill <stodghil@CS.Cornell.EDU>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20194
diff
changeset
|
351 ;; Revision 1.26 1997/10/28 21:14:51 os10000 |
c2017bcd6e9f
Patch from Paul Stodghill <stodghil@CS.Cornell.EDU>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20194
diff
changeset
|
352 ;; Improvements sent in by Dave Love <d.love@dl.ac.uk>: |
c2017bcd6e9f
Patch from Paul Stodghill <stodghil@CS.Cornell.EDU>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20194
diff
changeset
|
353 ;; todo-mode.el: Doc fixes. Customization. |
c2017bcd6e9f
Patch from Paul Stodghill <stodghil@CS.Cornell.EDU>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20194
diff
changeset
|
354 ;; (todo-add-item-non-interactively): New arg -- don't dynamically bind ARG. |
c2017bcd6e9f
Patch from Paul Stodghill <stodghil@CS.Cornell.EDU>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20194
diff
changeset
|
355 ;; (todo-insert-item): Use it. |
c2017bcd6e9f
Patch from Paul Stodghill <stodghil@CS.Cornell.EDU>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20194
diff
changeset
|
356 ;; |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
357 ;; Revision 1.25 1997/10/28 20:03:27 os10000 |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
358 ;; Harald Backer <harald.backer@fou.telenor.no> sent the following: |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
359 ;; Added `todo-save-top-priorities' and option to automatically save top |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
360 ;; priorities file when saving todo-file. Changed some default values. |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
361 ;; Bug fixes. |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
362 ;; |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
363 ;; Revision 1.24 1997/10/28 19:41:53 os10000 |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
364 ;; Added fix from Frank Ridderbusch <ridderbusch.pad@sni.de>, |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
365 ;; an apostrophe was missing. |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
366 ;; |
20192
bc27487e43bc
Added fix from Frank Ridderbusch <ridderbusch.pad@sni.de>,
Oliver Seidel <os10000@seidel-space.de>
parents:
20173
diff
changeset
|
367 ;; Revision 1.23 1997/10/24 17:30:54 os10000 |
bc27487e43bc
Added fix from Frank Ridderbusch <ridderbusch.pad@sni.de>,
Oliver Seidel <os10000@seidel-space.de>
parents:
20173
diff
changeset
|
368 ;; Added three suggestions from Carsten |
bc27487e43bc
Added fix from Frank Ridderbusch <ridderbusch.pad@sni.de>,
Oliver Seidel <os10000@seidel-space.de>
parents:
20173
diff
changeset
|
369 ;; Dominik <dominik@strw.LeidenUniv.nl>: |
bc27487e43bc
Added fix from Frank Ridderbusch <ridderbusch.pad@sni.de>,
Oliver Seidel <os10000@seidel-space.de>
parents:
20173
diff
changeset
|
370 ;; |
bc27487e43bc
Added fix from Frank Ridderbusch <ridderbusch.pad@sni.de>,
Oliver Seidel <os10000@seidel-space.de>
parents:
20173
diff
changeset
|
371 ;; - recommend autoloading instead of require |
bc27487e43bc
Added fix from Frank Ridderbusch <ridderbusch.pad@sni.de>,
Oliver Seidel <os10000@seidel-space.de>
parents:
20173
diff
changeset
|
372 ;; - inserting from different buffer didn't work |
bc27487e43bc
Added fix from Frank Ridderbusch <ridderbusch.pad@sni.de>,
Oliver Seidel <os10000@seidel-space.de>
parents:
20173
diff
changeset
|
373 ;; (now fixed -- I pray) |
bc27487e43bc
Added fix from Frank Ridderbusch <ridderbusch.pad@sni.de>,
Oliver Seidel <os10000@seidel-space.de>
parents:
20173
diff
changeset
|
374 ;; - provided public entry point to insert items |
bc27487e43bc
Added fix from Frank Ridderbusch <ridderbusch.pad@sni.de>,
Oliver Seidel <os10000@seidel-space.de>
parents:
20173
diff
changeset
|
375 ;; from normal lisp code |
bc27487e43bc
Added fix from Frank Ridderbusch <ridderbusch.pad@sni.de>,
Oliver Seidel <os10000@seidel-space.de>
parents:
20173
diff
changeset
|
376 ;; |
20173
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
377 ;; Revision 1.22 1997/10/24 16:53:20 os10000 |
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
378 ;; Paul Stodghill <stodghil@CS.Cornell.EDU> writes: |
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
379 ;; |
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
380 ;; When invoked with a prefix, todo-insert-item |
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
381 ;; should not prompt for a category. (He adds: |
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
382 ;; At least that's what I think.) |
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
383 ;; |
20172
14aea7edd810
Paul Stodghill <stodghil@CS.Cornell.EDU> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20171
diff
changeset
|
384 ;; Revision 1.21 1997/10/24 16:51:02 os10000 |
14aea7edd810
Paul Stodghill <stodghil@CS.Cornell.EDU> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20171
diff
changeset
|
385 ;; Rafael Laboissiere <rafael@icp.inpg.fr> writes: |
14aea7edd810
Paul Stodghill <stodghil@CS.Cornell.EDU> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20171
diff
changeset
|
386 ;; |
14aea7edd810
Paul Stodghill <stodghil@CS.Cornell.EDU> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20171
diff
changeset
|
387 ;; I was just annoyed with the fact that there is no way |
14aea7edd810
Paul Stodghill <stodghil@CS.Cornell.EDU> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20171
diff
changeset
|
388 ;; to dynamically control the insertion accuracy. I mean: |
14aea7edd810
Paul Stodghill <stodghil@CS.Cornell.EDU> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20171
diff
changeset
|
389 ;; the variable `todo-insert-threshold' does the job, but |
14aea7edd810
Paul Stodghill <stodghil@CS.Cornell.EDU> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20171
diff
changeset
|
390 ;; it is not very handy if one wants to mix the two |
14aea7edd810
Paul Stodghill <stodghil@CS.Cornell.EDU> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20171
diff
changeset
|
391 ;; behaviors (bisection and "insert right here under the |
14aea7edd810
Paul Stodghill <stodghil@CS.Cornell.EDU> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20171
diff
changeset
|
392 ;; cursor"). |
14aea7edd810
Paul Stodghill <stodghil@CS.Cornell.EDU> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20171
diff
changeset
|
393 ;; |
14aea7edd810
Paul Stodghill <stodghil@CS.Cornell.EDU> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20171
diff
changeset
|
394 ;; Therefore I did a quick hack in the function |
14aea7edd810
Paul Stodghill <stodghil@CS.Cornell.EDU> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20171
diff
changeset
|
395 ;; `todo-insert-item'. Now by giving a prefix argument to |
14aea7edd810
Paul Stodghill <stodghil@CS.Cornell.EDU> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20171
diff
changeset
|
396 ;; the insert command (i.e. by typing "C-u i"), entries |
14aea7edd810
Paul Stodghill <stodghil@CS.Cornell.EDU> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20171
diff
changeset
|
397 ;; are inserted exactly at the line where the cursor is. |
14aea7edd810
Paul Stodghill <stodghil@CS.Cornell.EDU> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20171
diff
changeset
|
398 ;; It would be better to give the value of |
14aea7edd810
Paul Stodghill <stodghil@CS.Cornell.EDU> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20171
diff
changeset
|
399 ;; `todo-insert-threshold' as a numeric argument of |
14aea7edd810
Paul Stodghill <stodghil@CS.Cornell.EDU> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20171
diff
changeset
|
400 ;; `todo-insert-item' (like "M-8 i"), but it's too late |
14aea7edd810
Paul Stodghill <stodghil@CS.Cornell.EDU> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20171
diff
changeset
|
401 ;; now for continuing to hack. |
14aea7edd810
Paul Stodghill <stodghil@CS.Cornell.EDU> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20171
diff
changeset
|
402 ;; |
20171
e691c040353f
Rafael Laboissiere <rafael@icp.inpg.fr> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20088
diff
changeset
|
403 ;; Revision 1.20 1997/10/17 15:41:57 os10000 |
e691c040353f
Rafael Laboissiere <rafael@icp.inpg.fr> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20088
diff
changeset
|
404 ;; Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have |
e691c040353f
Rafael Laboissiere <rafael@icp.inpg.fr> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20088
diff
changeset
|
405 ;; the following facilities available: |
e691c040353f
Rafael Laboissiere <rafael@icp.inpg.fr> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20088
diff
changeset
|
406 ;; |
e691c040353f
Rafael Laboissiere <rafael@icp.inpg.fr> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20088
diff
changeset
|
407 ;; Added todo-print, todo-top-priorities and todo-jump with matching |
e691c040353f
Rafael Laboissiere <rafael@icp.inpg.fr> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20088
diff
changeset
|
408 ;; variables; Parameterized todo-header, todo-category-beg, |
e691c040353f
Rafael Laboissiere <rafael@icp.inpg.fr> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20088
diff
changeset
|
409 ;; todo-category-end and todo-category-sep; Added autoload comments; |
e691c040353f
Rafael Laboissiere <rafael@icp.inpg.fr> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20088
diff
changeset
|
410 ;; todo-category-select: Modified regexp to make category names unique; |
e691c040353f
Rafael Laboissiere <rafael@icp.inpg.fr> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20088
diff
changeset
|
411 ;; todo-forward-item: Added optional COUNT vaiable; todo-insert-item: |
e691c040353f
Rafael Laboissiere <rafael@icp.inpg.fr> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20088
diff
changeset
|
412 ;; Rewrote completing read entry. |
e691c040353f
Rafael Laboissiere <rafael@icp.inpg.fr> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20088
diff
changeset
|
413 ;; |
e691c040353f
Rafael Laboissiere <rafael@icp.inpg.fr> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20088
diff
changeset
|
414 ;; Also, check out the extended list of things left to be done to this |
e691c040353f
Rafael Laboissiere <rafael@icp.inpg.fr> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20088
diff
changeset
|
415 ;; package at the end of the documentation! |
e691c040353f
Rafael Laboissiere <rafael@icp.inpg.fr> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20088
diff
changeset
|
416 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
417 ;; Revision 1.19 1997/10/16 21:21:16 os10000 |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
418 ;; Jari Aalto <jari.aalto@poboxes.com> writes: |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
419 ;; |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
420 ;; I just downloaded your package and after reading the docs I |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
421 ;; decided to do some reformatting. Hope you don't mind. Now |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
422 ;; they are in such a format that the html page can be |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
423 ;; automatically generated from the source file. As an example, I |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
424 ;; generated the attached page using the following command: |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
425 ;; ripdoc.pls < todo-mode.el | t2html.pls -a "Oliver.Seidel" -e \ |
20171
e691c040353f
Rafael Laboissiere <rafael@icp.inpg.fr> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20088
diff
changeset
|
426 ;; Oliver.Seidel@cl.cam.ac.uk -simple -base |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
427 ;; |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
428 ;; And of course I appreciate it. Jari's stuff can be found at: |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
429 ;; ftp://cs.uta.fi/pub/ssjaaa/, while I'm making the rev 1.18 page |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
430 ;; available at http://www.cl.cam.ac.uk/users/os10000/doc/todo-mode.html |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
431 ;; (That link will be valid until 10/1998 or slightly longer.) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
432 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
433 ;; 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
|
434 ;; 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
|
435 ;; 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
|
436 ;; 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
|
437 ;; 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
|
438 ;; |
20045
cf048b490803
Everything seems to work in Harald Melands Emacs 20.02 and
Oliver Seidel <os10000@seidel-space.de>
parents:
20044
diff
changeset
|
439 ;; 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
|
440 ;; 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
|
441 ;; |
20044
703ef56b7eb6
Attempted to reconcile Harald's changes with mine since 1.15.
Oliver Seidel <os10000@seidel-space.de>
parents:
20043
diff
changeset
|
442 ;; 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
|
443 ;; 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
|
444 ;; |
20043
fced838d50f4
Fixed 'file-item' and added 20.02 split-string function.
Oliver Seidel <os10000@seidel-space.de>
parents:
20042
diff
changeset
|
445 ;; 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
|
446 ;; 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
|
447 ;; 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
|
448 ;; 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
|
449 ;; |
20042
691f7e0ee17d
Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents:
20028
diff
changeset
|
450 ;; 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
|
451 ;; 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
|
452 ;; 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
|
453 ;; He writes: |
691f7e0ee17d
Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents:
20028
diff
changeset
|
454 ;; |
691f7e0ee17d
Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents:
20028
diff
changeset
|
455 ;; 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
|
456 ;; 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
|
457 ;; 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
|
458 ;; 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
|
459 ;; 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
|
460 ;; |
691f7e0ee17d
Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents:
20028
diff
changeset
|
461 ;; 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
|
462 ;; 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
|
463 ;; 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
|
464 ;; can't remember :) |
691f7e0ee17d
Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents:
20028
diff
changeset
|
465 ;; |
691f7e0ee17d
Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents:
20028
diff
changeset
|
466 ;; 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
|
467 ;; 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
|
468 ;; good. |
691f7e0ee17d
Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents:
20028
diff
changeset
|
469 ;; |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
470 ;; 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
|
471 ;; - 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
|
472 ;; - fixed menu descriptions |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
473 ;; - 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
|
474 ;; - 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
|
475 ;; |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
476 ;; 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
|
477 ;; Fixed header, typos, layout, documentation. |
19100 | 478 ;; |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
479 ;; 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
|
480 ;; 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
|
481 ;; to make menus work anywhere. |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
482 ;; |
19188
56e1d94a7083
Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents:
19187
diff
changeset
|
483 ;; 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
|
484 ;; 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
|
485 ;; 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
|
486 ;; |
19187
9d37b4ab16b5
Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents:
19186
diff
changeset
|
487 ;; 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
|
488 ;; 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
|
489 ;; 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
|
490 ;; 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
|
491 ;; |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
492 ;; 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
|
493 ;; 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
|
494 ;; |
19180
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
495 ;; 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
|
496 ;; 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
|
497 ;; <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
|
498 ;; fixed keyboard layout to remove unwanted keys. |
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
499 ;; |
19179
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
500 ;; 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
|
501 ;; 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
|
502 ;; 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
|
503 ;; |
19166
8af428cb3906
Incorporated menus for XEmacs from Allan.Cochrane@soton.sc.philips.com,
Oliver Seidel <os10000@seidel-space.de>
parents:
19165
diff
changeset
|
504 ;; 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
|
505 ;; 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
|
506 ;; 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
|
507 ;; |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
508 ;; 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
|
509 ;; Added Raise/Lower item. |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
510 ;; |
19143
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
511 ;; 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
|
512 ;; Cleaned up variables, prefix and cursor position. |
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
513 ;; |
19102
b605b8dbb880
Cleaned up variables, prefix and cursor position.
Oliver Seidel <os10000@seidel-space.de>
parents:
19101
diff
changeset
|
514 ;; 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
|
515 ;; It appears to work. |
b605b8dbb880
Cleaned up variables, prefix and cursor position.
Oliver Seidel <os10000@seidel-space.de>
parents:
19101
diff
changeset
|
516 ;; |
19101
31ba6200863a
It appears to work.
Oliver Seidel <os10000@seidel-space.de>
parents:
19100
diff
changeset
|
517 ;; 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
|
518 ;; Initial revision |
19100 | 519 ;; |
520 | |
521 ;; --------------------------------------------------------------------------- | |
522 | |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
523 ;;; Code: |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
524 |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
525 (eval-and-compile ; Removable for installation in |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
526 ; Emacs 20. |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
527 (condition-case () |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
528 (require 'custom) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
529 (error nil)) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
530 (if (and (featurep 'custom) (fboundp 'custom-declare-variable)) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
531 nil ;; We've got what we needed |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
532 ;; We have the old custom-library, hack around it! |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
533 (defmacro defgroup (&rest args) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
534 nil) |
23349
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
535 (defmacro defcustom (var value doc &rest args) |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
536 (` (defvar (, var) (, value) (, doc)))))) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
537 |
19100 | 538 ;; User-configurable variables: |
539 | |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
540 (defgroup todo nil |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
541 "Maintain a list of todo items." |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
542 :group 'calendar) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
543 |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
544 (defcustom todo-prefix "*/*" |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
545 "*TODO mode prefix for entries. |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
546 |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
547 This is useful in conjunction with `calendar' and `diary' if you use |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
548 |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
549 #include \"~/.todo-do\" |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
550 |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
551 in your diary file to include your todo list file as part of your |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
552 diary. With the default value \"*/*\" the diary displays each entry |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
553 every day and it may also be marked on every day of the calendar. |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
554 Using \"&%%(equal (calendar-current-date) date)\" instead will only |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
555 show and mark todo entreis for today, but may slow down processing of |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
556 the diary file somewhat." |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
557 :type 'string |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
558 :group 'todo) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
559 (defcustom todo-file-do "~/.todo-do" |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
560 "*TODO mode list file." |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
561 :type 'file |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
562 :group 'todo) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
563 (defcustom todo-file-done "~/.todo-done" |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
564 "*TODO mode archive file." |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
565 :type 'file |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
566 :group 'todo) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
567 (defcustom todo-mode-hook nil |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
568 "*TODO mode hooks." |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
569 :type 'hook |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
570 :group 'todo) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
571 (defcustom todo-edit-mode-hook nil |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
572 "*TODO Edit mode hooks." |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
573 :type 'hook |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
574 :group 'todo) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
575 (defcustom todo-insert-threshold 0 |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
576 "*TODO mode insertion accuracy. |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
577 |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
578 If you have 8 items in your TODO list, then you may get asked 4 |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
579 questions by the binary insertion algorithm. However, you may not |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
580 really have a need for such accurate priorities amongst your TODO |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
581 items. If you now think about the binary insertion halfing the size |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
582 of the window each time, then the threshhold is the window size at |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
583 which it will stop. If you set the threshhold to zero, the upper and |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
584 lower bound will coincide at the end of the loop and you will insert |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
585 your item just before that point. If you set the threshhold to, |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
586 e.g. 8, it will stop as soon as the window size drops below that |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
587 amount and will insert the item in the approximate centre of that |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
588 window." |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
589 :type 'integer |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
590 :group 'todo) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
591 (defvar todo-edit-buffer " *TODO Edit*" "TODO Edit buffer name.") |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
592 (defcustom todo-file-top "~/.todo-top" |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
593 "*TODO mode top priorities file. |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
594 |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
595 Not in TODO format, but diary compatible. |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
596 Automatically generated when `todo-save-top-priorities' is non-nil." |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
597 :type 'string |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
598 :group 'todo) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
599 |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
600 (defcustom todo-print-function 'ps-print-buffer-with-faces |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
601 "*Function to print the current buffer." |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
602 :type 'symbol |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
603 :group 'todo) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
604 (defcustom todo-show-priorities 1 |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
605 "*Default number of priorities to show by \\[todo-top-priorities]. |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
606 0 means show all entries." |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
607 :type 'integer |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
608 :group 'todo) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
609 (defcustom todo-print-priorities 0 |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
610 "*Default number of priorities to print by \\[todo-print]. |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
611 0 means print all entries." |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
612 :type 'integer |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
613 :group 'todo) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
614 (defcustom todo-remove-separator t |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
615 "*Non-nil to remove category separators in\ |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
616 \\[todo-top-priorities] and \\[todo-print]." |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
617 :type 'boolean |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
618 :group 'todo) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
619 (defcustom todo-save-top-priorities-too t |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
620 "*Non-nil makes todo-save automatically save top-priorities in |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
621 `todo-file-top'." |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
622 :type 'boolean |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
623 :group 'todo) |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
624 |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
625 ;; 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
|
626 ;; 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
|
627 ;; |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
628 (defcustom todo-time-string-format |
24494
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
629 "%04y-%02m-%02d %02H:%02M" |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
630 "*TODO mode time string format for done entries. |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
631 For details see the variable `time-stamp-format'." |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
632 :type 'string |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
633 :group 'todo) |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
634 |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
635 (defcustom todo-entry-prefix-function 'todo-entry-timestamp-initials |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
636 "*Function producing text to insert at start of todo entry." |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
637 :type 'symbol |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
638 :group 'todo) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
639 (defcustom todo-initials (or (getenv "INITIALS") (user-login-name)) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
640 "*Initials of todo item author." |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
641 :type 'string |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
642 :group 'todo) |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
643 |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
644 (defun todo-entry-timestamp-initials () |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
645 "Prepend timestamp and your initials to the head of a TODO entry." |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
646 (let ((time-stamp-format todo-time-string-format)) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
647 (concat (time-stamp-string) " " todo-initials ": "))) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
648 |
19100 | 649 ;; --------------------------------------------------------------------------- |
650 | |
19188
56e1d94a7083
Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents:
19187
diff
changeset
|
651 ;; Get some outside help ... |
56e1d94a7083
Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents:
19187
diff
changeset
|
652 |
24494
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
653 (require 'cl) |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
654 (require 'easymenu) |
19100 | 655 (require 'time-stamp) |
19188
56e1d94a7083
Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents:
19187
diff
changeset
|
656 |
56e1d94a7083
Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents:
19187
diff
changeset
|
657 ;; --------------------------------------------------------------------------- |
19100 | 658 |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
659 ;; Set up some helpful context ... |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
660 |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
661 (defvar todo-categories nil "TODO categories.") |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
662 (defvar todo-cats nil |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
663 "Old variable for holding the TODO categories. |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
664 Use `todo-categories' instead.") |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
665 (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
|
666 (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
|
667 (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
|
668 (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
|
669 |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
670 (defvar todo-tmp-buffer-name "*Tmp*") |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
671 |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
672 (defvar todo-category-sep (make-string 75 ?-) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
673 "Category separator.") |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
674 (defvar todo-category-beg " --- " |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
675 "Category start separator to be prepended onto category name.") |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
676 (defvar todo-category-end "--- End" |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
677 "Separator after a category.") |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
678 (defvar todo-header "-*- mode: todo; " |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
679 "Header of todo files.") |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
680 |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
681 |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
682 |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
683 ;; --------------------------------------------------------------------------- |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
684 |
19179
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
685 (if todo-mode-map |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
686 nil |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
687 (let ((map (make-keymap))) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
688 (suppress-keymap map t) |
24494
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
689 (define-key map "?" 'todo-help) |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
690 (define-key map " " 'todo-hide-show-subtree) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
691 (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
|
692 (define-key map "-" 'todo-backward-category) |
20198
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
693 (define-key map "d" 'todo-file-item) ;done/delete |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
694 (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
|
695 (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
|
696 (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
|
697 (define-key map "i" 'todo-insert-item) |
20197
33e3febd442d
Implemented "insert-under-cursor" as suggested by
Oliver Seidel <os10000@seidel-space.de>
parents:
20196
diff
changeset
|
698 (define-key map "I" 'todo-insert-item-here) |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
699 (define-key map "j" 'todo-jump-to-category) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
700 (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
|
701 (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
|
702 (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
|
703 (define-key map "p" 'todo-backward-item) |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
704 (define-key map "P" 'todo-print) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
705 (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
|
706 (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
|
707 (define-key map "s" 'todo-save) |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
708 (define-key map "S" 'todo-save-top-priorities) |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
709 (define-key map "t" 'todo-top-priorities) |
19179
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
710 (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
|
711 |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
712 (defun todo-category-select () |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
713 "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
|
714 (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
|
715 (setq mode-line-buffer-identification |
20643
2a37005dcd69
Added patch from Don Hejna <djhejna@oasis.ambit.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
20419
diff
changeset
|
716 (concat "Category: " (format "%18s" name))) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
717 (widen) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
718 (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
|
719 (search-forward-regexp |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
720 (concat "^" |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
721 (regexp-quote (concat todo-prefix todo-category-beg name)) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
722 "$")) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
723 (let ((begin (1+ (point-at-eol)))) |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
724 (search-forward-regexp (concat "^" todo-category-end)) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
725 (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
|
726 (goto-char (point-min))))) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
727 (defalias 'todo-cat-slct 'todo-category-select) |
19100 | 728 |
24494
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
729 (defun todo-help () "Show TODO mode help." |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
730 (interactive) |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
731 (describe-function 'todo-mode)) |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
732 |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
733 (defun todo-hide-show-subtree () "Hide or Show subtrees in the TODO list." |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
734 (interactive) |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
735 (save-excursion |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
736 (end-of-line) |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
737 (if (outline-visible) |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
738 (hide-subtree) |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
739 (show-subtree)))) |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
740 |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
741 (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
|
742 (interactive) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
743 (setq todo-category-number |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
744 (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
|
745 (todo-category-select)) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
746 (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
|
747 |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
748 (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
|
749 (interactive) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
750 (setq todo-category-number |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
751 (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
|
752 (todo-category-select)) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
753 (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
|
754 |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
755 (defun todo-backward-item () "Select previous entry of TODO list." |
19100 | 756 (interactive) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
757 (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
|
758 (message "")) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
759 (defalias 'todo-cmd-prev 'todo-backward-item) |
19100 | 760 |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
761 (defun todo-forward-item (&optional count) |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
762 "Select COUNT-th next entry of TODO list." |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
763 (interactive "P") |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
764 (if (listp count) (setq count (car count))) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
765 (end-of-line) |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
766 (search-forward-regexp (concat "^" (regexp-quote todo-prefix)) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
767 nil 'goto-end count) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
768 (beginning-of-line) |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
769 (message "")) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
770 (defalias 'todo-cmd-next 'todo-forward-item) |
19100 | 771 |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
772 (defun todo-save () "Save the TODO list." |
19100 | 773 (interactive) |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
774 (save-buffer) |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
775 (if todo-save-top-priorities-too (todo-save-top-priorities)) |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
776 ) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
777 (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
|
778 |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
779 (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
|
780 (interactive) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
781 (widen) |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
782 (todo-save) |
19102
b605b8dbb880
Cleaned up variables, prefix and cursor position.
Oliver Seidel <os10000@seidel-space.de>
parents:
19101
diff
changeset
|
783 (message "") |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
784 (bury-buffer)) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
785 (defalias 'todo-cmd-done 'todo-quit) |
19100 | 786 |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
787 (defun todo-edit-item () "Edit current TODO list entry." |
19100 | 788 (interactive) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
789 (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
|
790 (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
|
791 (todo-edit-multiline) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
792 (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
|
793 (todo-remove-item) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
794 (insert new "\n") |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
795 (todo-backward-item) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
796 (message ""))))) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
797 (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
|
798 |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
799 (defun todo-edit-multiline () |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
800 "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
|
801 (interactive) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
802 (let ((buffer-name (generate-new-buffer-name todo-edit-buffer))) |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
803 (switch-to-buffer |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
804 (make-indirect-buffer |
24494
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
805 (find-buffer-visiting todo-file-do) buffer-name)) |
20042
691f7e0ee17d
Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents:
20028
diff
changeset
|
806 (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
|
807 (todo-edit-mode) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
808 (narrow-to-region (todo-item-start) (todo-item-end)))) |
19100 | 809 |
24500
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
810 ;;;###autoload |
23349
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
811 (defun todo-add-category (cat) |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
812 "Add new category CAT to the TODO list." |
20388
fa0ae5cb8ab2
Added category patch by Michael R Cook <mcook@cognex.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
20199
diff
changeset
|
813 (interactive "sCategory: ") |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
814 (save-window-excursion |
24494
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
815 (pushnew cat todo-categories) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
816 (find-file todo-file-do) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
817 (widen) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
818 (goto-char (point-min)) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
819 (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
|
820 (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
|
821 (if (equal posn nil) |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
822 (progn |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
823 (insert "-*- mode: todo; \n") |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
824 (forward-char -1)) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
825 (kill-line))) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
826 (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
|
827 (forward-char 1) |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
828 (insert (format "%s%s%s\n%s\n%s %s\n" |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
829 todo-prefix todo-category-beg cat |
23349
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
830 todo-category-end |
24494
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
831 todo-prefix todo-category-sep)) |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
832 (save-buffer)) |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
833 0) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
834 |
24500
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
835 ;;;###autoload |
20199
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
836 (defun todo-add-item-non-interactively (new-item category) |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
837 "Insert NEW-ITEM in TODO list as a new entry in CATEGORY." |
20173
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
838 (save-excursion |
20195
c2017bcd6e9f
Patch from Paul Stodghill <stodghil@CS.Cornell.EDU>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20194
diff
changeset
|
839 (todo-show)) |
c2017bcd6e9f
Patch from Paul Stodghill <stodghil@CS.Cornell.EDU>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20194
diff
changeset
|
840 (save-excursion |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
841 (if (string= "" category) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
842 (setq category (nth todo-category-number todo-categories))) |
24494
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
843 (setq todo-category-number |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
844 (or (position category todo-categories :test 'equal) |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
845 (todo-add-category category))) |
20199
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
846 (todo-show) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
847 (setq todo-previous-line 0) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
848 (let ((top 1) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
849 (bottom (1+ (count-lines (point-min) (point-max))))) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
850 (while (> (- bottom top) todo-insert-threshold) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
851 (let* ((current (/ (+ top bottom) 2)) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
852 (answer (if (< current bottom) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
853 (todo-more-important-p current) nil))) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
854 (if answer |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
855 (setq bottom current) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
856 (setq top (1+ current))))) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
857 (setq top (/ (+ top bottom) 2)) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
858 ;; goto-line doesn't have the desired behavior in a narrowed buffer |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
859 (goto-char (point-min)) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
860 (forward-line (1- top))) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
861 (insert new-item "\n") |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
862 (todo-backward-item) |
24494
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
863 (progn ;;; horrible os10000 hack to make items appear when inserting into empty buffer |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
864 (widen) |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
865 (show-all) |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
866 (todo-forward-category) |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
867 (todo-backward-category)) |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
868 (todo-save) |
19179
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
869 (message ""))) |
20173
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
870 |
24500
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
871 ;;;###autoload |
20173
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
872 (defun todo-insert-item (ARG) |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
873 "Insert new TODO list entry. |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
874 With a prefix argument solicit the category, otherwise use the current |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
875 category." |
20173
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
876 (interactive "P") |
20195
c2017bcd6e9f
Patch from Paul Stodghill <stodghil@CS.Cornell.EDU>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20194
diff
changeset
|
877 (save-excursion |
20198
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
878 (if (not (string-equal mode-name "TODO")) (todo-show)) |
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
879 (let* ((new-item (concat todo-prefix " " |
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
880 (read-from-minibuffer |
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
881 "New TODO entry: " |
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
882 (if todo-entry-prefix-function |
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
883 (funcall todo-entry-prefix-function))))) |
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
884 (categories todo-categories) |
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
885 (history (cons 'categories (1+ todo-category-number))) |
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
886 (current-category (nth todo-category-number todo-categories)) |
23349
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
887 (category |
20198
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
888 (if ARG |
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
889 current-category |
23349
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
890 (completing-read |
20198
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
891 (concat "Category [" |
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
892 current-category "]: ") |
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
893 (todo-category-alist) nil nil nil history)))) |
20199
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
894 (todo-add-item-non-interactively new-item category)))) |
20173
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
895 |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
896 (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
|
897 |
24500
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
898 ;;;###autoload |
20197
33e3febd442d
Implemented "insert-under-cursor" as suggested by
Oliver Seidel <os10000@seidel-space.de>
parents:
20196
diff
changeset
|
899 (defun todo-insert-item-here () |
33e3febd442d
Implemented "insert-under-cursor" as suggested by
Oliver Seidel <os10000@seidel-space.de>
parents:
20196
diff
changeset
|
900 "Insert new TODO list entry under the cursor." |
20199
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
901 (interactive "") |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
902 (save-excursion |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
903 (if (not (string-equal mode-name "TODO")) (todo-show)) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
904 (let* ((new-item (concat todo-prefix " " |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
905 (read-from-minibuffer |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
906 "New TODO entry: " |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
907 (if todo-entry-prefix-function |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
908 (funcall todo-entry-prefix-function)))))) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
909 (insert (concat new-item "\n"))))) |
20197
33e3febd442d
Implemented "insert-under-cursor" as suggested by
Oliver Seidel <os10000@seidel-space.de>
parents:
20196
diff
changeset
|
910 |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
911 (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
|
912 "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
|
913 (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
|
914 (progn |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
915 (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
|
916 (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
|
917 (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
|
918 (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
|
919 (setq todo-previous-answer |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
920 (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
|
921 todo-previous-answer) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
922 (defalias 'todo-ask-p 'todo-more-important-p) |
19100 | 923 |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
924 (defun todo-delete-item () "Delete current TODO list entry." |
19100 | 925 (interactive) |
926 (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
|
927 (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
|
928 (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
|
929 todo-entry "'? ")))) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
930 (if todo-answer |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
931 (progn |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
932 (todo-remove-item) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
933 (todo-backward-item))) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
934 (message "")) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
935 (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
|
936 (defalias 'todo-cmd-kill 'todo-delete-item) |
19100 | 937 |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
938 (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
|
939 (interactive) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
940 (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
|
941 (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
|
942 (todo-remove-item) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
943 (todo-backward-item) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
944 (save-excursion |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
945 (insert item "\n")) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
946 (message "")) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
947 (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
|
948 (defalias 'todo-cmd-rais 'todo-raise-item) |
19143
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
949 |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
950 (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
|
951 (interactive) |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
952 (if (> (count-lines (point) (point-max)) 1) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
953 ;; Assume there is a final newline |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
954 (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
|
955 (todo-remove-item) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
956 (todo-forward-item) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
957 (save-excursion |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
958 (insert item "\n")) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
959 (message "")) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
960 (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
|
961 (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
|
962 |
20419
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
963 (defun todo-file-item (&optional comment) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
964 "File the current TODO list entry away, |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
965 annotated with an optional COMMENT." |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
966 (interactive "sComment: ") |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
967 (or (> (count-lines (point-min) (point-max)) 0) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
968 (error "No TODO list entry to file away")) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
969 (let ((time-stamp-format todo-time-string-format)) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
970 (if (and comment (> (length comment) 0)) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
971 (progn |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
972 (goto-char (todo-item-end)) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
973 (insert |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
974 (if (save-excursion (beginning-of-line) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
975 (looking-at (regexp-quote todo-prefix))) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
976 " " |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
977 "\n\t") |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
978 "(" comment ")"))) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
979 (goto-char (todo-item-end)) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
980 (insert " [" (nth todo-category-number todo-categories) "]") |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
981 (goto-char (todo-item-start)) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
982 (let ((temp-point (point))) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
983 (if (looking-at (regexp-quote todo-prefix)) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
984 (replace-match (time-stamp-string)) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
985 ;; Standard prefix -> timestamp |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
986 ;; Else prefix non-standard item start with timestamp |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
987 (insert (time-stamp-string))) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
988 (append-to-file temp-point (1+ (todo-item-end)) todo-file-done) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
989 (delete-region temp-point (1+ (todo-item-end)))) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
990 (todo-backward-item) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
991 (message ""))) |
19100 | 992 |
993 ;; --------------------------------------------------------------------------- | |
994 | |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
995 ;; Utility functions: |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
996 |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
997 |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
998 ;;;###autoload |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
999 (defun todo-top-priorities (&optional nof-priorities category-pr-page) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1000 "List top priorities for each category. |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1001 |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1002 Number of entries for each category is given by NOF-PRIORITIES which |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1003 defaults to \'todo-show-priorities\'. |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1004 |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1005 If CATEGORY-PR-PAGE is non-nil, a page separator \'^L\' is inserted |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1006 between each category." |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1007 |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1008 (interactive "P") |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1009 (or nof-priorities (setq nof-priorities todo-show-priorities)) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1010 (if (listp nof-priorities) ;universal argument |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1011 (setq nof-priorities (car nof-priorities))) |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
1012 (let ((todo-print-buffer-name "*Tmp*") |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
1013 ;;(todo-print-category-number 0) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
1014 (todo-category-break (if category-pr-page "" "")) |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1015 (cat-end |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1016 (concat |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1017 (if todo-remove-separator |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1018 (concat todo-category-end "\n" |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1019 (regexp-quote todo-prefix) " " todo-category-sep "\n") |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1020 (concat todo-category-end "\n")))) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1021 beg end) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1022 (todo-show) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1023 (save-excursion |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1024 (save-restriction |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1025 (widen) |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
1026 (copy-to-buffer todo-print-buffer-name (point-min) (point-max)) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
1027 (set-buffer todo-print-buffer-name) |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1028 (goto-char (point-min)) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1029 (if (re-search-forward (regexp-quote todo-header) nil t) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1030 (progn |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1031 (beginning-of-line 1) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1032 (kill-line))) ;Remove mode line |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1033 (while (re-search-forward ;Find category start |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1034 (regexp-quote (concat todo-prefix todo-category-beg)) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1035 nil t) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1036 (setq beg (+ (point-at-eol) 1)) ;Start of first entry. |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1037 (re-search-forward cat-end nil t) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1038 (setq end (match-beginning 0)) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1039 (replace-match todo-category-break) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1040 (narrow-to-region beg end) ;In case we have too few entries. |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1041 (goto-char (point-min)) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1042 (if (= 0 nof-priorities) ;Traverse entries. |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1043 (goto-char end) ;All entries |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1044 (todo-forward-item nof-priorities)) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1045 (setq beg (point)) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1046 (delete-region beg end) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1047 (widen)) |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1048 (and (looking-at "") (replace-match "")) ;Remove trailing form-feed. |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1049 (goto-char (point-min)) ;Due to display buffer |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1050 )) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1051 ;; Could have used switch-to-buffer as it has a norecord argument, |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1052 ;; which is nice when we are called from e.g. todo-print. |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1053 ;; Else we could have used pop-to-buffer. |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
1054 (display-buffer todo-print-buffer-name) |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1055 (message "Type C-x 1 to remove %s window. M-C-v to scroll the help." |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
1056 todo-print-buffer-name) |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1057 )) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1058 |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1059 ;;;###autoload |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1060 (defun todo-save-top-priorities (&optional nof-priorities) |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1061 "Save top priorities for each category in `todo-file-top'. |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1062 |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1063 Number of entries for each category is given by NOF-PRIORITIES which |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1064 defaults to `todo-show-priorities'." |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1065 (interactive "P") |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1066 (save-window-excursion |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1067 (save-excursion |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1068 (save-restriction |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1069 (todo-top-priorities nof-priorities) |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1070 (set-buffer todo-tmp-buffer-name) |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1071 (write-file todo-file-top) |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1072 (kill-this-buffer) |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1073 )))) |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1074 |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1075 ;;;###autoload |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1076 (defun todo-print (&optional category-pr-page) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1077 "Print todo summary using \\\[todo-print-function]. |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1078 If CATEGORY-PR-PAGE is non-nil, a page separator \'^L\' is inserted |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1079 between each category. |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1080 |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1081 Number of entries for each category is given by |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1082 \'todo-print-priorities\'." |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1083 (interactive "P") |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1084 (if todo-print-function |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1085 (progn |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1086 (save-window-excursion |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1087 (save-excursion |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1088 (save-restriction |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1089 (todo-top-priorities todo-print-priorities |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1090 category-pr-page) |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1091 (set-buffer todo-tmp-buffer-name) |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1092 (and (funcall todo-print-function) |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1093 (kill-this-buffer)) |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1094 (message "Todo printing done.")) |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1095 ))) |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1096 (message "todo-print-function undefinded") |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1097 )) |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1098 |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1099 (defun todo-jump-to-category () |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1100 "Jump to a category. Default is previous category." |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1101 (interactive) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1102 (let* ((categories todo-categories) |
24494
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
1103 (history (cons 'categories (1+ todo-category-number))) |
23349
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
1104 (category (completing-read |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1105 (concat "Category [" |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1106 (nth todo-category-number todo-categories) "]: ") |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1107 (todo-category-alist) nil nil nil history))) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1108 (if (string= "" category) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1109 (setq category (nth todo-category-number todo-categories))) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1110 (setq todo-category-number |
24494
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
1111 (or (position category todo-categories :test 'equal) |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
1112 (todo-add-category category))) |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1113 (todo-show))) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1114 |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1115 (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
|
1116 (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
|
1117 |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1118 (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
|
1119 "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
|
1120 ;; 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
|
1121 (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
|
1122 (if (> (length item) 60) |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1123 (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
|
1124 item)) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1125 |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1126 (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
|
1127 (save-excursion |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1128 (beginning-of-line) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1129 (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
|
1130 (search-backward-regexp |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1131 (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
|
1132 (point))) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1133 |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1134 (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
|
1135 (save-excursion |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1136 (end-of-line) |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1137 (search-forward-regexp |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1138 (concat "^" (regexp-quote todo-prefix)) nil 'goto-end) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1139 (1- (point-at-bol)))) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1140 |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1141 (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
|
1142 (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
|
1143 |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1144 (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
|
1145 (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
|
1146 |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1147 (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
|
1148 "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
|
1149 (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
|
1150 |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1151 (defun todo-string-multiline-p (string) |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
1152 "Return non-nil if STRING spans several lines." |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1153 (> (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
|
1154 |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1155 (defun todo-category-alist () |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
1156 "Generate an alist for 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
|
1157 (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
|
1158 todo-categories)) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1159 |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
1160 ;; 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
|
1161 |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
1162 (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
|
1163 (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
|
1164 (save-excursion |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1165 (beginning-of-line) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1166 (point)))) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
1167 |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
1168 (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
|
1169 (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
|
1170 (save-excursion |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1171 (end-of-line) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1172 (point)))) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
1173 |
20042
691f7e0ee17d
Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents:
20028
diff
changeset
|
1174 ;; 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
|
1175 (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
|
1176 (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
|
1177 "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
|
1178 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
|
1179 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
|
1180 which is returned. |
fced838d50f4
Fixed 'file-item' and added 20.02 split-string function.
Oliver Seidel <os10000@seidel-space.de>
parents:
20042
diff
changeset
|
1181 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
|
1182 (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
|
1183 (start 0) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1184 (list nil)) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1185 (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
|
1186 (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
|
1187 (setq list |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1188 (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
|
1189 list))) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1190 (setq start (match-end 0))) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1191 (or (eq start (length string)) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1192 (setq list |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1193 (cons (substring string start) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1194 list))) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1195 (nreverse list)))) |
20042
691f7e0ee17d
Added string-split (which I stole from ediff-util), changed
Oliver Seidel <os10000@seidel-space.de>
parents:
20028
diff
changeset
|
1196 |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
1197 ;; --------------------------------------------------------------------------- |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
1198 |
19188
56e1d94a7083
Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents:
19187
diff
changeset
|
1199 (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
|
1200 '("Todo" |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1201 ["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
|
1202 ["Previous category" todo-backward-category t] |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1203 ["Jump to category" todo-jump-to-category t] |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1204 ["Show top priority items" todo-top-priorities t] |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1205 ["Print categories" todo-print t] |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1206 "---" |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1207 ["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
|
1208 ["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
|
1209 ["Insert new item" todo-insert-item t] |
20197
33e3febd442d
Implemented "insert-under-cursor" as suggested by
Oliver Seidel <os10000@seidel-space.de>
parents:
20196
diff
changeset
|
1210 ["Insert item here" todo-insert-item-here t] |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1211 ["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
|
1212 "---" |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1213 ["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
|
1214 ["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
|
1215 "---" |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1216 ["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
|
1217 ["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
|
1218 "---" |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1219 ["Save" todo-save t] |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
1220 ["Save Top Priorities" todo-save-top-priorities t] |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1221 "---" |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1222 ["Quit" todo-quit t] |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1223 )) |
19166
8af428cb3906
Incorporated menus for XEmacs from Allan.Cochrane@soton.sc.philips.com,
Oliver Seidel <os10000@seidel-space.de>
parents:
19165
diff
changeset
|
1224 |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
1225 ;; As calendar reads .todo-do before todo-mode is loaded. |
24500
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
1226 ;;;###autoload |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
1227 (defun todo-mode () "Major mode for editing TODO lists.\n\n\\{todo-mode-map}" |
19100 | 1228 (interactive) |
1229 (setq major-mode 'todo-mode) | |
1230 (setq mode-name "TODO") | |
1231 (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
|
1232 (easy-menu-add todo-menu) |
24494
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
1233 (setq paragraph-separate "\*/\*") |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
1234 (setq fill-prefix "\t\t") |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
1235 (setq outline-regexp "\\*/\\*") |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
1236 (outline-minor-mode 1) |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
1237 (hide-other) |
ea1ab7f25110
Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98
Oliver Seidel <os10000@seidel-space.de>
parents:
23349
diff
changeset
|
1238 (auto-fill-mode 1) |
19188
56e1d94a7083
Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents:
19187
diff
changeset
|
1239 (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
|
1240 |
20196
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
1241 ;; Read about this function in the setup instructions above! |
24500
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
1242 ;;;###autoload |
20196
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
1243 (defun todo-cp () |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
1244 "Make a diary entry appear only in the current date's diary" |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
1245 (if (equal (calendar-current-date) date) |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
1246 entry |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
1247 nil)) |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
1248 |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1249 (defun todo-edit-mode () |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1250 "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
|
1251 (text-mode) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1252 (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
|
1253 (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
|
1254 (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
|
1255 |
24500
1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
Oliver Seidel <os10000@seidel-space.de>
parents:
24494
diff
changeset
|
1256 ;;;###autoload |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
1257 (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
|
1258 (interactive) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1259 (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
|
1260 (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
|
1261 (todo-initial-setup)) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1262 (if (null todo-categories) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1263 (if (null todo-cats) |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1264 (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
|
1265 todo-file-do) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1266 (goto-char (point-min)) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1267 (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
|
1268 (replace-match "todo-categories:")) |
20192
bc27487e43bc
Added fix from Frank Ridderbusch <ridderbusch.pad@sni.de>,
Oliver Seidel <os10000@seidel-space.de>
parents:
20173
diff
changeset
|
1269 (make-local-variable 'todo-categories) |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
1270 (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
|
1271 (beginning-of-line) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1272 (todo-category-select)) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1273 |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1274 (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
|
1275 (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
|
1276 (erase-buffer) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1277 (todo-mode) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
1278 (todo-add-category "Todo")) |
19100 | 1279 |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
1280 (provide 'todo-mode) |
19100 | 1281 |
1282 ;; --------------------------------------------------------------------------- | |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
1283 ;;; todo-mode.el ends here |
19100 | 1284 ;; --------------------------------------------------------------------------- |