Mercurial > emacs
annotate lisp/calendar/todo-mode.el @ 39562:9c9bba5b5bad
(frame-parameter): Add a setf method.
(ignore-errors): Don't bother using a `err' symbol.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Fri, 05 Oct 2001 09:30:23 +0000 |
parents | b174db545cfd |
children | 5fe63defd48e |
rev | line source |
---|---|
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
38296
diff
changeset
|
1 ;;; todo-mode.el --- major mode for editing TODO list files |
19100 | 2 |
38296
5bcd50b6b826
(todo-top-priorities): Use delete-region
Gerd Moellmann <gerd@gnu.org>
parents:
34968
diff
changeset
|
3 ;; Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc. |
19100 | 4 |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
5 ;; Author: Oliver Seidel <os10000@seidel-space.de> |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
6 ;; [Not clear the above works, July 2000] |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
7 ;; Created: 2 Aug 1997 |
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
38296
diff
changeset
|
8 ;; Version: $Id: todo-mode.el,v 1.46 2001/07/05 13:51:17 gerd Exp $ |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
9 ;; Keywords: calendar, todo |
19180
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
10 |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
11 ;; 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
|
12 |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
13 ;; 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
|
14 ;; 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
|
15 ;; 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
|
16 ;; any later version. |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
17 |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
18 ;; 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
|
19 ;; 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
|
20 ;; 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
|
21 ;; GNU General Public License for more details. |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
22 |
19180
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
23 ;; 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
|
24 ;; 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
|
25 ;; 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
|
26 ;; Boston, MA 02111-1307, USA. |
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 ;; --------------------------------------------------------------------------- |
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
29 |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
30 ;;; Commentary: |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
31 |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
32 ;; Mode Description |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
33 ;; |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
34 ;; 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
|
35 ;; 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
|
36 ;; 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
|
37 ;; 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
|
38 ;; 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
|
39 ;; 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
|
40 ;; mode. |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
41 ;; |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
42 ;; 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
|
43 ;; 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
|
44 ;; 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
|
45 ;; 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
|
46 ;; 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
|
47 ;; 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
|
48 ;; 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
|
49 ;; file. |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
50 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
51 ;; Preface, Quickstart Installation |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
52 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
53 ;; 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
|
54 ;; |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
55 ;; (autoload 'todo-mode "todo-mode" |
20173
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
56 ;; "Major mode for editing TODO lists." t) |
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
57 ;; (autoload 'todo-show "todo-mode" |
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
58 ;; "Show TODO items." t) |
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
59 ;; (autoload 'todo-insert-item "todo-mode" |
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
60 ;; "Add TODO item." t) |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
61 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
62 ;; 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
|
63 ;; 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
|
64 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
65 ;; 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
|
66 ;; 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
|
67 ;; 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
|
68 ;; 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
|
69 ;; 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
|
70 ;; afterwards. |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
71 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
72 ;; 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
|
73 ;; 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
|
74 ;; 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
|
75 ;; |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
76 ;; (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
|
77 ;; (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
|
78 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
79 ;; 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
|
80 ;; 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
|
81 ;; 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
|
82 ;; 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
|
83 ;; 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
|
84 ;; 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
|
85 ;; 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
|
86 ;; 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
|
87 ;; 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
|
88 ;; 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
|
89 ;; its buffer). |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
90 ;; |
20196
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
91 ;; 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
|
92 ;; 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
|
93 ;; 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
|
94 ;; installation. |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
95 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
96 ;; Version |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
97 ;; |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
98 ;; 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
|
99 ;; |
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
38296
diff
changeset
|
100 ;; $Id: todo-mode.el,v 1.46 2001/07/05 13:51:17 gerd Exp $ |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
101 ;; |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
102 ;; Pre-Requisites |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
103 ;; |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
104 ;; This package will require the following packages to be |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
105 ;; available on the load-path: |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
106 ;; |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
107 ;; time-stamp |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
108 ;; easymenu |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
109 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
110 ;; Operation |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
111 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
112 ;; 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
|
113 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
114 ;; 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
|
115 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
116 ;; + to go to next category |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
117 ;; - 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
|
118 ;; 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
|
119 ;; comment and timestamp |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
120 ;; e to edit the current entry |
20198
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
121 ;; 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
|
122 ;; 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
|
123 ;; comment and timestamp |
20199
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
124 ;; 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
|
125 ;; 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
|
126 ;; j jump to category |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
127 ;; 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
|
128 ;; 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
|
129 ;; n for the next entry |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
130 ;; 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
|
131 ;; P print |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
132 ;; 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
|
133 ;; 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
|
134 ;; 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
|
135 ;; 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
|
136 ;; 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
|
137 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
138 ;; 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
|
139 ;; 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
|
140 ;; 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
|
141 ;; 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
|
142 ;; 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
|
143 ;; 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
|
144 ;; 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
|
145 ;; 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
|
146 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
147 ;; Configuration |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
148 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
149 ;; Variable todo-prefix |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
150 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
151 ;; 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
|
152 ;; 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
|
153 ;; 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
|
154 ;; |
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 ;; 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
|
156 ;; 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
|
157 ;; 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
|
158 ;; 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
|
159 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
160 ;; 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
|
161 ;; 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
|
162 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
163 ;; "&%%(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
|
164 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
165 ;; 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
|
166 ;; 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
|
167 ;; |
20196
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
168 ;; Carsten Dominik <dominik@strw.LeidenUniv.nl> suggested that |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
169 ;; |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
170 ;; "&%%(todo-cp)" |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
171 ;; |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
172 ;; 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
|
173 ;; 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
|
174 ;; |
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
175 ;; 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
|
176 ;; 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
|
177 ;; 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
|
178 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
179 ;; Variable todo-file-do |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
180 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
181 ;; 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
|
182 ;; 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
|
183 ;; 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
|
184 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
185 ;; Variable todo-file-done |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
186 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
187 ;; 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
|
188 ;; 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
|
189 ;; 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
|
190 ;; 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
|
191 ;; 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
|
192 ;; |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
193 ;; 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
|
194 ;; |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
195 ;; 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
|
196 ;; 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
|
197 ;; 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
|
198 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
199 ;; Variable todo-mode-hook |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
200 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
201 ;; 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
|
202 ;; 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
|
203 ;; 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
|
204 ;; 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
|
205 ;; completed. |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
206 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
207 ;; Variable todo-insert-threshold |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
208 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
209 ;; 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
|
210 ;; 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
|
211 ;; 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
|
212 ;; 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
|
213 ;; 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
|
214 ;; 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
|
215 ;; 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
|
216 ;; 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
|
217 ;; 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
|
218 ;; 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
|
219 ;; 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
|
220 ;; 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
|
221 ;; 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
|
222 ;; 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
|
223 ;; 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
|
224 ;; good reading. Thanks Trey! |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
225 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
226 ;; Things to do |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
227 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
228 ;; 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
|
229 ;; 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
|
230 ;; |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
231 ;; 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
|
232 ;; 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
|
233 ;; 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
|
234 ;; 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
|
235 ;; 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
|
236 ;; "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
|
237 ;; 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
|
238 ;; 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
|
239 ;; 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
|
240 ;; 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
|
241 ;; 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
|
242 ;; o license / version function |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
243 ;; o export to diary file |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
244 ;; o todo-report-bug |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
245 ;; 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
|
246 ;; 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
|
247 ;; 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
|
248 ;; 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
|
249 ;; 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
|
250 ;; 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
|
251 ;; 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
|
252 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
253 ;; History and Gossip |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
254 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
255 ;; 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
|
256 ;; 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
|
257 ;; 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
|
258 ;; |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
259 ;; 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
|
260 ;; 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
|
261 ;; |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
262 ;; 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
|
263 ;; (Lessingstr. 8, 65760 Eschborn, Federal Republic of Germany) |
19100 | 264 |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
265 ;;; Code: |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
266 |
19100 | 267 ;; User-configurable variables: |
268 | |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
269 (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
|
270 "Maintain a list of todo items." |
34968 | 271 :link '(emacs-commentary-link "todo-mode") |
272 :version "21.1" | |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
273 :group 'calendar) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
274 |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
275 (defcustom todo-prefix "*/*" |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
276 "*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
|
277 |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
278 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
|
279 |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
280 #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
|
281 |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
282 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
|
283 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
|
284 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
|
285 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
|
286 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
|
287 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
|
288 :type 'string |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
289 :group 'todo) |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
290 (defcustom todo-file-do "~/.todo-do" |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
291 "*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
|
292 :type 'file |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
293 :group 'todo) |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
294 (defcustom todo-file-done "~/.todo-done" |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
295 "*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
|
296 :type 'file |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
297 :group 'todo) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
298 (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
|
299 "*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
|
300 :type 'hook |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
301 :group 'todo) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
302 (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
|
303 "*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
|
304 :type 'hook |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
305 :group 'todo) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
306 (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
|
307 "*TODO mode insertion accuracy. |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
308 |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
309 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
|
310 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
|
311 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
|
312 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
|
313 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
|
314 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
|
315 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
|
316 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
|
317 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
|
318 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
|
319 window." |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
320 :type 'integer |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
321 :group 'todo) |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
322 (defvar todo-edit-buffer " *TODO Edit*" |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
323 "TODO Edit buffer name.") |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
324 (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
|
325 "*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
|
326 |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
327 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
|
328 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
|
329 :type 'string |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
330 :group 'todo) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
331 |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
332 (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
|
333 "*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
|
334 :type 'symbol |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
335 :group 'todo) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
336 (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
|
337 "*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
|
338 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
|
339 :type 'integer |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
340 :group 'todo) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
341 (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
|
342 "*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
|
343 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
|
344 :type 'integer |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
345 :group 'todo) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
346 (defcustom todo-remove-separator t |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
347 "*Non-nil to remove category separators in\ |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
348 \\[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
|
349 :type 'boolean |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
350 :group 'todo) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
351 (defcustom todo-save-top-priorities-too t |
29390
bc5fce1393f8
[This needs more work on the outline stuff.]
Dave Love <fx@gnu.org>
parents:
28889
diff
changeset
|
352 "*Non-nil makes `todo-save' automatically save top-priorities in `todo-file-top'." |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
353 :type 'boolean |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
354 :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
|
355 |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
356 ;; 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
|
357 ;; 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
|
358 ;; |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
359 (defcustom todo-time-string-format |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
360 "%:y-%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
|
361 "*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
|
362 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
|
363 :type 'string |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
364 :group 'todo) |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
365 |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
366 (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
|
367 "*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
|
368 :type 'symbol |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
369 :group 'todo) |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
370 (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
|
371 "*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
|
372 :type 'string |
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
373 :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
|
374 |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
375 (autoload 'time-stamp-string "time-stamp") |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
376 |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
377 (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
|
378 "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
|
379 (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
|
380 (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
|
381 |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
382 ;; --------------------------------------------------------------------------- |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
383 |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
384 ;; Set up some helpful context ... |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
385 |
28889
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
386 (defvar todo-categories nil |
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
387 "TODO categories.") |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
388 |
28889
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
389 (defvar todo-cats nil |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
390 "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
|
391 Use `todo-categories' instead.") |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
392 |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
393 (defvar todo-previous-line 0 |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
394 "Previous line asked about.") |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
395 |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
396 (defvar todo-previous-answer 0 |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
397 "Previous answer got.") |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
398 |
28889
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
399 (defvar todo-mode-map |
19179
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
400 (let ((map (make-keymap))) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
401 (suppress-keymap map t) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
402 (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
|
403 (define-key map "-" 'todo-backward-category) |
20198
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
404 (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
|
405 (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
|
406 (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
|
407 (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
|
408 (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
|
409 (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
|
410 (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
|
411 (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
|
412 (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
|
413 (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
|
414 (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
|
415 (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
|
416 (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
|
417 (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
|
418 (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
|
419 (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
|
420 (define-key map "t" 'todo-top-priorities) |
28889
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
421 map) |
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
422 "TODO mode keymap.") |
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
423 |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
424 (defvar todo-category-number 0 "TODO category number.") |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
425 |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
426 (defvar todo-tmp-buffer-name " *todo tmp*") |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
427 |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
428 (defvar todo-category-sep (make-string 75 ?-) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
429 "Category separator.") |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
430 |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
431 (defvar todo-category-beg " --- " |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
432 "Category start separator to be prepended onto category name.") |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
433 |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
434 (defvar todo-category-end "--- End" |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
435 "Separator after a category.") |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
436 |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
437 (defvar todo-header "-*- mode: todo; " |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
438 "Header of todo files.") |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
439 |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
440 ;; --------------------------------------------------------------------------- |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
441 |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
442 (defun todo-category-select () |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
443 "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
|
444 (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
|
445 (setq mode-line-buffer-identification |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
446 ;; (concat "Category: " name)) |
20643
2a37005dcd69
Added patch from Don Hejna <djhejna@oasis.ambit.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
20419
diff
changeset
|
447 (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
|
448 (widen) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
449 (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
|
450 (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
|
451 (concat "^" |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
452 (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
|
453 "$")) |
28889
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
454 (let ((begin (1+ (line-end-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
|
455 (search-forward-regexp (concat "^" todo-category-end)) |
28889
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
456 (narrow-to-region begin (line-beginning-position)) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
457 (goto-char (point-min))))) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
458 (defalias 'todo-cat-slct 'todo-category-select) |
19100 | 459 |
28889
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
460 (defun todo-forward-category () |
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
461 "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
|
462 (interactive) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
463 (setq todo-category-number |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
464 (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
|
465 (todo-category-select)) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
466 (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
|
467 |
28889
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
468 (defun todo-backward-category () |
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
469 "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
|
470 (interactive) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
471 (setq todo-category-number |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
472 (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
|
473 (todo-category-select)) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
474 (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
|
475 |
28889
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
476 (defun todo-backward-item () |
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
477 "Select previous entry of TODO list." |
19100 | 478 (interactive) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
479 (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
|
480 (message "")) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
481 (defalias 'todo-cmd-prev 'todo-backward-item) |
19100 | 482 |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
483 (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
|
484 "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
|
485 (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
|
486 (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
|
487 (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
|
488 (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
|
489 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
|
490 (beginning-of-line) |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
491 (message "")) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
492 (defalias 'todo-cmd-next 'todo-forward-item) |
19100 | 493 |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
494 (defun todo-save () |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
495 "Save the TODO list." |
19100 | 496 (interactive) |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
497 (save-buffer) |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
498 (if todo-save-top-priorities-too (todo-save-top-priorities)) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
499 ) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
500 (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
|
501 |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
502 (defun todo-quit () |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
503 "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
|
504 (interactive) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
505 (widen) |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
506 (todo-save) |
19102
b605b8dbb880
Cleaned up variables, prefix and cursor position.
Oliver Seidel <os10000@seidel-space.de>
parents:
19101
diff
changeset
|
507 (message "") |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
508 (bury-buffer)) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
509 (defalias 'todo-cmd-done 'todo-quit) |
19100 | 510 |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
511 (defun todo-edit-item () |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
512 "Edit current TODO list entry." |
19100 | 513 (interactive) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
514 (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
|
515 (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
|
516 (todo-edit-multiline) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
517 (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
|
518 (todo-remove-item) |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
519 (insert new "\n") |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
520 (todo-backward-item) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
521 (message ""))))) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
522 (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
|
523 |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
524 (defun todo-edit-multiline () |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
525 "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
|
526 (interactive) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
527 (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
|
528 (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
|
529 (make-indirect-buffer |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
530 (file-name-nondirectory 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
|
531 (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
|
532 (todo-edit-mode) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
533 (narrow-to-region (todo-item-start) (todo-item-end)))) |
19100 | 534 |
34968 | 535 ;;;###autoload |
23349
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
536 (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
|
537 "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
|
538 (interactive "sCategory: ") |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
539 (save-window-excursion |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
540 (setq todo-categories (cons cat todo-categories)) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
541 (find-file todo-file-do) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
542 (widen) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
543 (goto-char (point-min)) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
544 (let ((posn (search-forward "-*- mode: todo; " 17 t))) |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
545 (if (not (null posn)) (goto-char posn)) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
546 (if (equal posn nil) |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
547 (progn |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
548 (insert "-*- mode: todo; \n") |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
549 (forward-char -1)) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
550 (kill-line))) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
551 (insert (format "todo-categories: %S; -*-" todo-categories)) |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
552 (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
|
553 (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
|
554 todo-prefix todo-category-beg cat |
23349
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
555 todo-category-end |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
556 todo-prefix todo-category-sep))) |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
557 0) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
558 |
34968 | 559 ;;;###autoload |
20199
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
560 (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
|
561 "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
|
562 (save-excursion |
20195
c2017bcd6e9f
Patch from Paul Stodghill <stodghil@CS.Cornell.EDU>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20194
diff
changeset
|
563 (todo-show)) |
c2017bcd6e9f
Patch from Paul Stodghill <stodghil@CS.Cornell.EDU>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20194
diff
changeset
|
564 (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
|
565 (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
|
566 (setq category (nth todo-category-number todo-categories))) |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
567 (let ((cat-exists (member category todo-categories))) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
568 (setq todo-category-number |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
569 (if cat-exists |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
570 (- (length todo-categories) (length cat-exists)) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
571 (todo-add-category category)))) |
20199
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
572 (todo-show) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
573 (setq todo-previous-line 0) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
574 (let ((top 1) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
575 (bottom (1+ (count-lines (point-min) (point-max))))) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
576 (while (> (- bottom top) todo-insert-threshold) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
577 (let* ((current (/ (+ top bottom) 2)) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
578 (answer (if (< current bottom) |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
579 (todo-more-important-p current) nil))) |
20199
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
580 (if answer |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
581 (setq bottom current) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
582 (setq top (1+ current))))) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
583 (setq top (/ (+ top bottom) 2)) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
584 ;; 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
|
585 (goto-char (point-min)) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
586 (forward-line (1- top))) |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
587 (insert new-item "\n") |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
588 (todo-backward-item) |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
589 (todo-save) |
19179
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
590 (message ""))) |
20173
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
591 |
34968 | 592 ;;;###autoload |
30027 | 593 (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
|
594 "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
|
595 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
|
596 category." |
20173
0044ff755ee7
Added three suggestions from Carsten
Oliver Seidel <os10000@seidel-space.de>
parents:
20172
diff
changeset
|
597 (interactive "P") |
20195
c2017bcd6e9f
Patch from Paul Stodghill <stodghil@CS.Cornell.EDU>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20194
diff
changeset
|
598 (save-excursion |
20198
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
599 (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
|
600 (let* ((new-item (concat todo-prefix " " |
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
601 (read-from-minibuffer |
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
602 "New TODO entry: " |
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
603 (if todo-entry-prefix-function |
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
604 (funcall todo-entry-prefix-function))))) |
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
605 (categories todo-categories) |
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
606 (history (cons 'categories (1+ todo-category-number))) |
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
607 (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
|
608 (category |
30027 | 609 (if arg |
20198
8fa6333a22f2
Improved documentation, fixed insertion with prefix.
Oliver Seidel <os10000@seidel-space.de>
parents:
20197
diff
changeset
|
610 current-category |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
611 (completing-read (concat "Category [" current-category "]: ") |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
612 (todo-category-alist) nil nil nil |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
613 history current-category)))) |
20199
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
614 (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
|
615 |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
616 (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
|
617 |
20197
33e3febd442d
Implemented "insert-under-cursor" as suggested by
Oliver Seidel <os10000@seidel-space.de>
parents:
20196
diff
changeset
|
618 (defun todo-insert-item-here () |
33e3febd442d
Implemented "insert-under-cursor" as suggested by
Oliver Seidel <os10000@seidel-space.de>
parents:
20196
diff
changeset
|
619 "Insert new TODO list entry under the cursor." |
20199
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
620 (interactive "") |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
621 (save-excursion |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
622 (if (not (string-equal mode-name "TODO")) (todo-show)) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
623 (let* ((new-item (concat todo-prefix " " |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
624 (read-from-minibuffer |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
625 "New TODO entry: " |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
626 (if todo-entry-prefix-function |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
627 (funcall todo-entry-prefix-function)))))) |
70fcbe6a5e23
Three insertion options:
Oliver Seidel <os10000@seidel-space.de>
parents:
20198
diff
changeset
|
628 (insert (concat new-item "\n"))))) |
20197
33e3febd442d
Implemented "insert-under-cursor" as suggested by
Oliver Seidel <os10000@seidel-space.de>
parents:
20196
diff
changeset
|
629 |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
630 (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
|
631 "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
|
632 (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
|
633 (progn |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
634 (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
|
635 (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
|
636 (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
|
637 (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
|
638 (setq todo-previous-answer |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
639 (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
|
640 todo-previous-answer) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
641 (defalias 'todo-ask-p 'todo-more-important-p) |
19100 | 642 |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
643 (defun todo-delete-item () |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
644 "Delete current TODO list entry." |
19100 | 645 (interactive) |
646 (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
|
647 (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
|
648 (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
|
649 todo-entry "'? ")))) |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
650 (if todo-answer |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
651 (progn |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
652 (todo-remove-item) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
653 (todo-backward-item))) |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
654 (message "")) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
655 (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
|
656 (defalias 'todo-cmd-kill 'todo-delete-item) |
19100 | 657 |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
658 (defun todo-raise-item () |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
659 "Raise priority of current entry." |
19143
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
660 (interactive) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
661 (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
|
662 (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
|
663 (todo-remove-item) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
664 (todo-backward-item) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
665 (save-excursion |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
666 (insert item "\n")) |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
667 (message "")) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
668 (error "No TODO list entry to raise"))) |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
669 (defalias 'todo-cmd-rais 'todo-raise-item) |
19143
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
670 |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
671 (defun todo-lower-item () |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
672 "Lower priority of current entry." |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
673 (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
|
674 (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
|
675 ;; 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
|
676 (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
|
677 (todo-remove-item) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
678 (todo-forward-item) |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
679 (save-excursion |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
680 (insert item "\n")) |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
681 (message "")) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
682 (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
|
683 (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
|
684 |
20419
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
685 (defun todo-file-item (&optional comment) |
29390
bc5fce1393f8
[This needs more work on the outline stuff.]
Dave Love <fx@gnu.org>
parents:
28889
diff
changeset
|
686 "File the current TODO list entry away, annotated with an optional COMMENT." |
20419
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
687 (interactive "sComment: ") |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
688 (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
|
689 (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
|
690 (let ((time-stamp-format todo-time-string-format)) |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
691 (if (and comment (> (length comment) 0)) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
692 (progn |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
693 (goto-char (todo-item-end)) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
694 (insert |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
695 (if (save-excursion (beginning-of-line) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
696 (looking-at (regexp-quote todo-prefix))) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
697 " " |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
698 "\n\t") |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
699 "(" comment ")"))) |
20419
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
700 (goto-char (todo-item-end)) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
701 (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
|
702 (goto-char (todo-item-start)) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
703 (let ((temp-point (point))) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
704 (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
|
705 (replace-match (time-stamp-string)) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
706 ;; Standard prefix -> timestamp |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
707 ;; 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
|
708 (insert (time-stamp-string))) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
709 (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
|
710 (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
|
711 (todo-backward-item) |
28110a85d23e
Another patch by Michael Cook to fix annotation.
Oliver Seidel <os10000@seidel-space.de>
parents:
20388
diff
changeset
|
712 (message ""))) |
19100 | 713 |
714 ;; --------------------------------------------------------------------------- | |
715 | |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
716 ;; Utility functions: |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
717 |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
718 |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
719 ;;;###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
|
720 (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
|
721 "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
|
722 |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
723 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
|
724 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
|
725 |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
726 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
|
727 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
|
728 |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
729 (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
|
730 (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
|
731 (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
|
732 (setq nof-priorities (car nof-priorities))) |
33795 | 733 (let ((todo-print-buffer-name todo-tmp-buffer-name) |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
734 ;;(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
|
735 (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
|
736 (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
|
737 (concat |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
738 (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
|
739 (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
|
740 (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
|
741 (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
|
742 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
|
743 (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
|
744 (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
|
745 (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
|
746 (widen) |
20194
c7b847e97647
Improvements sent in by Dave Love <d.love@dl.ac.uk>:
Oliver Seidel <os10000@seidel-space.de>
parents:
20193
diff
changeset
|
747 (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
|
748 (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
|
749 (goto-char (point-min)) |
38296
5bcd50b6b826
(todo-top-priorities): Use delete-region
Gerd Moellmann <gerd@gnu.org>
parents:
34968
diff
changeset
|
750 (when (re-search-forward (regexp-quote todo-header) nil t) |
5bcd50b6b826
(todo-top-priorities): Use delete-region
Gerd Moellmann <gerd@gnu.org>
parents:
34968
diff
changeset
|
751 (beginning-of-line 1) |
5bcd50b6b826
(todo-top-priorities): Use delete-region
Gerd Moellmann <gerd@gnu.org>
parents:
34968
diff
changeset
|
752 (delete-region (point) (line-end-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
|
753 (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
|
754 (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
|
755 nil t) |
28889
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
756 (setq beg (+ (line-end-position) 1)) ;Start of first 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
|
757 (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
|
758 (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
|
759 (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
|
760 (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
|
761 (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
|
762 (if (= 0 nof-priorities) ;Traverse entries. |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
763 (goto-char end) ;All entries |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
764 (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
|
765 (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
|
766 (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
|
767 (widen)) |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
768 (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
|
769 (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
|
770 )) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
771 ;; 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
|
772 ;; 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
|
773 ;; 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
|
774 (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
|
775 (message "Type C-x 1 to remove %s window. M-C-v to scroll the help." |
28889
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
776 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
|
777 |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
778 (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
|
779 "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
|
780 |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
781 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
|
782 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
|
783 (interactive "P") |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
784 (save-window-excursion |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
785 (save-excursion |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
786 (save-restriction |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
787 (todo-top-priorities nof-priorities) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
788 (set-buffer todo-tmp-buffer-name) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
789 (write-file todo-file-top) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
790 (kill-this-buffer))))) |
20193
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
791 |
ab4710f1f645
Harald Backer <harald.backer@fou.telenor.no> sent the following:
Oliver Seidel <os10000@seidel-space.de>
parents:
20192
diff
changeset
|
792 ;;;###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
|
793 (defun todo-print (&optional category-pr-page) |
29390
bc5fce1393f8
[This needs more work on the outline stuff.]
Dave Love <fx@gnu.org>
parents:
28889
diff
changeset
|
794 "Print todo summary using `todo-print-function'. |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
795 If CATEGORY-PR-PAGE is non-nil, a page separator `^L' is inserted |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
796 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
|
797 |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
798 Number of entries for each category is given by `todo-print-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
|
799 (interactive "P") |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
800 (save-window-excursion |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
801 (save-excursion |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
802 (save-restriction |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
803 (todo-top-priorities todo-print-priorities |
28889
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
804 category-pr-page) |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
805 (set-buffer todo-tmp-buffer-name) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
806 (and (funcall todo-print-function) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
807 (kill-this-buffer)) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
808 (message "Todo printing done."))))) |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
809 |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
810 (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
|
811 "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
|
812 (interactive) |
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
813 (let* ((categories todo-categories) |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
814 (history (cons 'categories (1+ todo-category-number))) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
815 (default (nth todo-category-number todo-categories)) |
23349
081564884463
Alex Schroeder startup description added.
Oliver Seidel <os10000@seidel-space.de>
parents:
20643
diff
changeset
|
816 (category (completing-read |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
817 (concat "Category [" default "]: ") |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
818 (todo-category-alist) nil nil nil history default))) |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
819 (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
|
820 (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
|
821 (setq todo-category-number |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
822 (if (member category todo-categories) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
823 (- (length todo-categories) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
824 (length (member category todo-categories))) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
825 (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
|
826 (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
|
827 |
28889
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
828 (defun todo-line-string () |
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
829 "Return current line in buffer as a string." |
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
830 (buffer-substring (line-beginning-position) (line-end-position))) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
831 |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
832 (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
|
833 "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
|
834 ;; 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
|
835 (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
|
836 (if (> (length item) 60) |
20084
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
837 (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
|
838 item)) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
839 |
28889
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
840 (defun todo-item-start () |
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
841 "Return point at start of current TODO list item." |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
842 (save-excursion |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
843 (beginning-of-line) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
844 (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
|
845 (search-backward-regexp |
c97d281f1bd2
Jari Aalto <jari.aalto@ntc.nokia.com> writes:
Oliver Seidel <os10000@seidel-space.de>
parents:
20045
diff
changeset
|
846 (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
|
847 (point))) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
848 |
28889
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
849 (defun todo-item-end () |
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
850 "Return point at end of current TODO list item." |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
851 (save-excursion |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
852 (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
|
853 (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
|
854 (concat "^" (regexp-quote todo-prefix)) nil 'goto-end) |
28889
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
855 (1- (line-beginning-position)))) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
856 |
28889
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
857 (defun todo-remove-item () |
7d6f2982fe6e
Remove some compatibility stuff and CL
Dave Love <fx@gnu.org>
parents:
24720
diff
changeset
|
858 "Delete the current entry from the TODO list." |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
859 (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
|
860 |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
861 (defun todo-item-string () |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
862 "Return current TODO list entry as a string." |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
863 (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
|
864 |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
865 (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
|
866 "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
|
867 (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
|
868 |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
869 (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
|
870 "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
|
871 (> (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
|
872 |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
873 (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
|
874 "Generate an alist for use in `completing-read' from `todo-categories'." |
29390
bc5fce1393f8
[This needs more work on the outline stuff.]
Dave Love <fx@gnu.org>
parents:
28889
diff
changeset
|
875 (mapcar #'list todo-categories)) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
876 |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
877 ;; --------------------------------------------------------------------------- |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
878 |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
879 (easy-menu-define todo-menu todo-mode-map "Todo Menu" |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
880 '("Todo" |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
881 ["Next category" todo-forward-category t] |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
882 ["Previous category" todo-backward-category t] |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
883 ["Jump to category" todo-jump-to-category t] |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
884 ["Show top priority items" todo-top-priorities t] |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
885 ["Print categories" todo-print t] |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
886 "---" |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
887 ["Edit item" todo-edit-item t] |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
888 ["File item" todo-file-item t] |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
889 ["Insert new item" todo-insert-item t] |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
890 ["Insert item here" todo-insert-item-here t] |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
891 ["Kill item" todo-delete-item t] |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
892 "---" |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
893 ["Lower item priority" todo-lower-item t] |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
894 ["Raise item priority" todo-raise-item t] |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
895 "---" |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
896 ["Next item" todo-forward-item t] |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
897 ["Previous item" todo-backward-item t] |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
898 "---" |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
899 ["Save" todo-save t] |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
900 ["Save Top Priorities" todo-save-top-priorities t] |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
901 "---" |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
902 ["Quit" todo-quit t] |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
903 )) |
19166
8af428cb3906
Incorporated menus for XEmacs from Allan.Cochrane@soton.sc.philips.com,
Oliver Seidel <os10000@seidel-space.de>
parents:
19165
diff
changeset
|
904 |
20088
1d51bc7c2563
Thanks to Harald Backer <harald.backer@fou.telenor.no>, we now have
Oliver Seidel <os10000@seidel-space.de>
parents:
20084
diff
changeset
|
905 ;; As calendar reads .todo-do before todo-mode is loaded. |
34968 | 906 ;;;###autoload |
29390
bc5fce1393f8
[This needs more work on the outline stuff.]
Dave Love <fx@gnu.org>
parents:
28889
diff
changeset
|
907 (defun todo-mode () |
bc5fce1393f8
[This needs more work on the outline stuff.]
Dave Love <fx@gnu.org>
parents:
28889
diff
changeset
|
908 "Major mode for editing TODO lists. |
bc5fce1393f8
[This needs more work on the outline stuff.]
Dave Love <fx@gnu.org>
parents:
28889
diff
changeset
|
909 |
bc5fce1393f8
[This needs more work on the outline stuff.]
Dave Love <fx@gnu.org>
parents:
28889
diff
changeset
|
910 \\{todo-mode-map}" |
19100 | 911 (interactive) |
912 (setq major-mode 'todo-mode) | |
913 (setq mode-name "TODO") | |
914 (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
|
915 (easy-menu-add todo-menu) |
56e1d94a7083
Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents:
19187
diff
changeset
|
916 (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
|
917 |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
918 (eval-when-compile |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
919 (defvar date) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
920 (defvar entry)) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
921 |
20196
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
922 ;; Read about this function in the setup instructions above! |
34968 | 923 ;;;###autoload |
20196
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
924 (defun todo-cp () |
29390
bc5fce1393f8
[This needs more work on the outline stuff.]
Dave Love <fx@gnu.org>
parents:
28889
diff
changeset
|
925 "Make a diary entry appear only in the current date's diary." |
20196
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
926 (if (equal (calendar-current-date) date) |
29390
bc5fce1393f8
[This needs more work on the outline stuff.]
Dave Love <fx@gnu.org>
parents:
28889
diff
changeset
|
927 entry)) |
20196
5c9cedc7dd75
Incorporated simplifying suggestions from
Oliver Seidel <os10000@seidel-space.de>
parents:
20195
diff
changeset
|
928 |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
929 (define-derived-mode todo-edit-mode text-mode "TODO Edit" |
29390
bc5fce1393f8
[This needs more work on the outline stuff.]
Dave Love <fx@gnu.org>
parents:
28889
diff
changeset
|
930 "Major mode for editing items in the TODO list. |
bc5fce1393f8
[This needs more work on the outline stuff.]
Dave Love <fx@gnu.org>
parents:
28889
diff
changeset
|
931 |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
932 \\{todo-edit-mode-map}") |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
933 |
34968 | 934 ;;;###autoload |
29390
bc5fce1393f8
[This needs more work on the outline stuff.]
Dave Love <fx@gnu.org>
parents:
28889
diff
changeset
|
935 (defun todo-show () |
bc5fce1393f8
[This needs more work on the outline stuff.]
Dave Love <fx@gnu.org>
parents:
28889
diff
changeset
|
936 "Show TODO list." |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
937 (interactive) |
20028
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
938 (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
|
939 (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
|
940 (todo-initial-setup)) |
30028
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
941 (if (null todo-categories) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
942 (if (null todo-cats) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
943 (error "Error in %s: No categories in list `todo-categories'" |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
944 todo-file-do) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
945 (goto-char (point-min)) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
946 (and (search-forward "todo-cats:" nil t) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
947 (replace-match "todo-categories:")) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
948 (make-local-variable 'todo-categories) |
2a636f84f3c5
Replaced with a working version, based on revision 1.34 tidied up.
Dave Love <fx@gnu.org>
parents:
30027
diff
changeset
|
949 (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
|
950 (beginning-of-line) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
951 (todo-category-select)) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
952 |
29390
bc5fce1393f8
[This needs more work on the outline stuff.]
Dave Love <fx@gnu.org>
parents:
28889
diff
changeset
|
953 (defun todo-initial-setup () |
bc5fce1393f8
[This needs more work on the outline stuff.]
Dave Love <fx@gnu.org>
parents:
28889
diff
changeset
|
954 "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
|
955 (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
|
956 (erase-buffer) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
957 (todo-mode) |
a5846414f380
Harald Meland <harald.meland@usit.uio.no> asked for
Oliver Seidel <os10000@seidel-space.de>
parents:
19436
diff
changeset
|
958 (todo-add-category "Todo")) |
19100 | 959 |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
960 (provide 'todo-mode) |
19100 | 961 |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
962 ;;; todo-mode.el ends here |