Mercurial > emacs
annotate lisp/calendar/todo-mode.el @ 19775:70b808126773
Test __OpenBSD__ along with __NetBSD__.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 06 Sep 1997 19:37:47 +0000 |
parents | 38aa295db414 |
children | a5846414f380 |
rev | line source |
---|---|
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
1 ;;; todo-mode.el -- Major mode for editing TODO list files |
19100 | 2 |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
3 ;; Copyright (C) 1997 Free Software Foundation, Inc. |
19100 | 4 |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
5 ;; Author: Oliver.Seidel@cl.cam.ac.uk (was valid on Aug 2, 1997) |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
6 ;; Created: 2 Aug 1997 |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
7 ;; Version: $Id:$ |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
8 ;; Keywords: Categorised TODO list editor, todo-mode |
19180
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
9 |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
10 ;; This file is part of GNU Emacs. |
19180
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
11 |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
12 ;; GNU Emacs is free software; you can redistribute it and/or modify |
19180
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
13 ;; it under the terms of the GNU General Public License as published by |
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
14 ;; the Free Software Foundation; either version 2, or (at your option) |
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
15 ;; any later version. |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
16 |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
17 ;; GNU Emacs is distributed in the hope that it will be useful, |
19180
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
20 ;; GNU General Public License for more details. |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
21 |
19180
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
22 ;; You should have received a copy of the GNU General Public License |
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
25 ;; Boston, MA 02111-1307, USA. |
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
26 |
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
27 ;; --------------------------------------------------------------------------- |
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
28 |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
29 ;;; Commentary: |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
30 |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
31 ;; Quickstart Installation: |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
32 ;; ======================== |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
33 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
34 ;; To get this to work, make emacs execute the line |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
35 ;; |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
36 ;; (require 'todo-mode) ;; load the TODO package |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
37 ;; |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
38 ;; You may now enter new items by typing "M-x todo-cmd-inst", or enter |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
39 ;; your the TODO list file by typing "M-x todo-show". |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
40 ;; |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
41 ;; The TODO list file has a special format and some auxiliary information, |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
42 ;; which will be added by the todo-show function if it attempts to visit |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
43 ;; an un-initialised file. Hence it is recommended to use the todo-show |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
44 ;; function for the first time, in order to initialise the file, but it |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
45 ;; is not necessary afterwards. |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
46 ;; |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
47 ;; As these commands are quite long to type, I would recommend the addition |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
48 ;; of two bindings to your to your global keymap. I personally have the |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
49 ;; following in my initialisation file: |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
50 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
51 ;; (global-set-key "\C-ct" 'todo-show) ;; switch to TODO buffer |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
52 ;; (global-set-key "\C-ci" 'todo-cmd-inst) ;; insert new item |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
53 ;; |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
54 ;; Note, however, that this recommendation has prompted some criticism, |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
55 ;; since the keys C-c LETTER are reserved for user functions. I believe |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
56 ;; my recommendation is acceptable, since the Emacs Lisp Manual *Tips* |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
57 ;; section also details that the mode itself should not bind any functions |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
58 ;; to those keys. The express aim of the above two bindings is to work |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
59 ;; outside the mode, which doesn't need the show function and offers |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
60 ;; a different binding for the insert function. They serve as shortcuts |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
61 ;; and are not even needed (since the TODO mode will be entered by |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
62 ;; visiting the TODO file, and later by switching to its buffer). |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
63 ;; |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
64 ;; |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
65 ;; |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
66 ;; Pre-Requisites |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
67 ;; ============== |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
68 ;; |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
69 ;; This package will require the following packages to be available on |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
70 ;; the load-path: |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
71 ;; - time-stamp |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
72 ;; - easymenu |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
73 ;; |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
74 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
75 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
76 ;; Description: |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
77 ;; ============ |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
78 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
79 ;; TODO is a major mode for EMACS which offers functionality to treat |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
80 ;; most lines in one buffer as a list of items one has to do. There |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
81 ;; are facilities to add new items, which are categorised, to edit or |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
82 ;; even delete items from the buffer. The buffer contents are currently |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
83 ;; compatible with the diary, so that the list of todo-items will show |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
84 ;; up in the FANCY diary mode. |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
85 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
86 ;; Notice: Besides the major mode, this file also exports the function |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
87 ;; "todo-show" which will change to the one specific TODO file that has |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
88 ;; been specified in the todo-file-do variable. If this file does not |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
89 ;; conform to the TODO mode conventions, the todo-show function will add |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
90 ;; the appropriate header and footer. I don't anticipate this to cause |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
91 ;; much grief, but be warned, in case you attempt to read a plain text file. |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
92 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
93 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
94 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
95 ;; Operation: |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
96 ;; ========== |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
97 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
98 ;; You will have the following facilities available: |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
99 ;; |
19187
9d37b4ab16b5
Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents:
19186
diff
changeset
|
100 ;; M-x todo-show will enter the todo list screen, here type |
9d37b4ab16b5
Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents:
19186
diff
changeset
|
101 ;; |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
102 ;; + to go to next category |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
103 ;; - to go to previous category |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
104 ;; e to edit the current entry |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
105 ;; f to file the current entry, including a |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
106 ;; comment and timestamp |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
107 ;; i to insert a new entry |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
108 ;; k to kill the current entry |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
109 ;; l to lower the current entry's priority |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
110 ;; n for the next entry |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
111 ;; p for the previous entry |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
112 ;; q to save the list and exit the buffer |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
113 ;; r to raise the current entry's priority |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
114 ;; s to save the list |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
115 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
116 ;; When you add a new entry, you are asked for the text and then for the |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
117 ;; category. I for example have categories for things that I want to do |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
118 ;; in the office (like mail my mum), that I want to do in town (like buy |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
119 ;; cornflakes) and things I want to do at home (move my suitcases). The |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
120 ;; categories can be selected with the cursor keys and if you type in the |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
121 ;; name of a category which didn't exist before, an empty category of the |
19187
9d37b4ab16b5
Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents:
19186
diff
changeset
|
122 ;; 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
|
123 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
124 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
125 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
126 ;; Configuration: |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
127 ;; ============== |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
128 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
129 ;; --- todo-prefix |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
130 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
131 ;; I would like to recommend that you use the prefix "*/*" (by |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
132 ;; leaving the variable 'todo-prefix' untouched) so that the diary |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
133 ;; displays each entry every day. |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
134 ;; |
19187
9d37b4ab16b5
Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents:
19186
diff
changeset
|
135 ;; To understand what I mean, please read the documentation that goes |
9d37b4ab16b5
Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents:
19186
diff
changeset
|
136 ;; with the calendar since that will tell you how you can set up the |
9d37b4ab16b5
Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents:
19186
diff
changeset
|
137 ;; fancy diary display and use the #include command to include your |
9d37b4ab16b5
Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents:
19186
diff
changeset
|
138 ;; 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
|
139 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
140 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
141 ;; --- todo-file-do |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
142 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
143 ;; This variable is fairly self-explanatory. You have to store your TODO |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
144 ;; list somewhere. This variable tells the package where to go and find |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
145 ;; this file. |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
146 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
147 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
148 ;; --- todo-file-done |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
149 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
150 ;; Even when you're done, you may wish to retain the entries. Given |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
151 ;; that they're timestamped and you are offered to add a comment, this |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
152 ;; can make a useful diary of past events. It will even blend in with |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
153 ;; the EMACS diary package. So anyway, this variable holds the name |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
154 ;; of the file for the filed todo-items. |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
155 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
156 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
157 ;; --- todo-mode-hook |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
158 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
159 ;; Just like other modes, too, this mode offers to call your functions |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
160 ;; before it goes about its business. This variable will be inspected |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
161 ;; for any functions you may wish to have called once the other TODO |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
162 ;; mode preparations have been completed. |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
163 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
164 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
165 ;; --- todo-ins-thresh |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
166 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
167 ;; Another nifty feature is the insertion accuracy. If you have 8 items |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
168 ;; in your TODO list, then you may get asked 4 questions by the binary |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
169 ;; insertion algorithm. However, you may not really have a need for such |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
170 ;; accurate priorities amongst your TODO items. If you now think about |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
171 ;; the binary insertion halfing the size of the window each time, then |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
172 ;; the threshhold is the window size at which it will stop. If you set |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
173 ;; the threshhold to zero, the upper and lower bound will coincide at the |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
174 ;; end of the loop and you will insert your item just before that point. |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
175 ;; If you set the threshhold to i.e. 8, it will stop as soon as the window |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
176 ;; size drops below that amount and will insert the item in the approximate |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
177 ;; centre of that window. I got the idea for this feature after reading |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
178 ;; a very helpful e-mail reply from Trey Jackson <trey@cs.berkeley.edu> |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
179 ;; who corrected some of my awful coding and pointed me towards some good |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
180 ;; reading. Thanks Trey! |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
181 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
182 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
183 ;; |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
184 ;; |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
185 ;; Things to do: |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
186 ;; ============= |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
187 ;; |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
188 ;; - licence / version function |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
189 ;; - export to diary file |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
190 ;; - todo-report-bug |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
191 ;; - GNATS support |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
192 ;; - add idea from Urban Boquist <boquist@cs.chalmers.se>: multi-line-entries |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
193 ;; - 'e' opens buffer for multi-line entry |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
194 ;; - elide multiline |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
195 ;; - rewrite complete package to store data as lisp objects and have |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
196 ;; display modes for display, for diary export, etc. |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
197 ;; |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
198 ;; |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
199 ;; |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
200 ;; History and Gossip: |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
201 ;; =================== |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
202 ;; |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
203 ;; Many thanks to all the ones who have contributed to the evolution of this |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
204 ;; package! I hope I have listed all of you somewhere in the documentation |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
205 ;; or at least in the RCS history! |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
206 ;; |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
207 ;; Enjoy this package and express your gratitude by sending nice things |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
208 ;; to my parents' address! |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
209 ;; |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
210 ;; Oliver Seidel |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
211 ;; |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
212 ;; (O Seidel, Lessingstr. 8, 65760 Eschborn, Federal Republic of Germany) |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
213 ;; |
19180
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
214 |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
215 ;; --------------------------------------------------------------------------- |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
216 |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
217 ;; --------------------------------------------------------------------------- |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
218 |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
219 ;;; Change Log: |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
220 |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
221 ;; $Log: todo-mode.el,v $ |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
222 ;; Revision 1.12 1997/08/06 10:56:15 os10000 |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
223 ;; Fixed header, typos, layout, documentation. |
19100 | 224 ;; |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
225 ;; Revision 1.11 1997/08/06 09:14:25 os10000 |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
226 ;; Applied patch from Istvan Marko <istvan@cmdmail.amd.com> |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
227 ;; to make menus work anywhere. |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
228 ;; |
19188
56e1d94a7083
Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents:
19187
diff
changeset
|
229 ;; Revision 1.10 1997/08/06 08:56:03 os10000 |
56e1d94a7083
Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents:
19187
diff
changeset
|
230 ;; Acted upon suggestion from Shane Holder <holder@rsn.hp.com>: |
56e1d94a7083
Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents:
19187
diff
changeset
|
231 ;; Cancelling the editing of an entry will not delete it any more. |
56e1d94a7083
Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents:
19187
diff
changeset
|
232 ;; |
19187
9d37b4ab16b5
Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents:
19186
diff
changeset
|
233 ;; Revision 1.9 1997/08/06 08:12:03 os10000 |
9d37b4ab16b5
Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents:
19186
diff
changeset
|
234 ;; Improved documentation. Broke some lines to comply with |
9d37b4ab16b5
Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents:
19186
diff
changeset
|
235 ;; Richard Stallman's email to please keep in sync with the |
9d37b4ab16b5
Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents:
19186
diff
changeset
|
236 ;; rest of the Emacs distribution files. |
9d37b4ab16b5
Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents:
19186
diff
changeset
|
237 ;; |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
238 ;; Revision 1.8 1997/08/05 22:39:04 os10000 |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
239 ;; Made todo-mode.el available under GPL. |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
240 ;; |
19180
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
241 ;; Revision 1.7 1997/08/05 22:34:14 os10000 |
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
242 ;; Fixed insertion routine with help from Trey Jackson |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
243 ;; <trey@cs.berkeley.edu>; added todo-ins-thresh; |
19180
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
244 ;; fixed keyboard layout to remove unwanted keys. |
5de82ccd80eb
Made todomode.el available under GPL.
Oliver Seidel <os10000@seidel-space.de>
parents:
19179
diff
changeset
|
245 ;; |
19179
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
246 ;; Revision 1.6 1997/08/05 16:47:01 os10000 |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
247 ;; Incorporated menus for XEmacs from Allan.Cochrane@soton.sc.philips.com, |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
248 ;; fixed TYPO, fixed todo-file-cmd, cleaned up rcs history. |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
249 ;; |
19166
8af428cb3906
Incorporated menus for XEmacs from Allan.Cochrane@soton.sc.philips.com,
Oliver Seidel <os10000@seidel-space.de>
parents:
19165
diff
changeset
|
250 ;; Revision 1.5 1997/08/05 14:43:39 os10000 |
8af428cb3906
Incorporated menus for XEmacs from Allan.Cochrane@soton.sc.philips.com,
Oliver Seidel <os10000@seidel-space.de>
parents:
19165
diff
changeset
|
251 ;; Added improvements from Ron Gut <rgut@aware.com>. |
8af428cb3906
Incorporated menus for XEmacs from Allan.Cochrane@soton.sc.philips.com,
Oliver Seidel <os10000@seidel-space.de>
parents:
19165
diff
changeset
|
252 ;; Added category management. |
8af428cb3906
Incorporated menus for XEmacs from Allan.Cochrane@soton.sc.philips.com,
Oliver Seidel <os10000@seidel-space.de>
parents:
19165
diff
changeset
|
253 ;; |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
254 ;; Revision 1.4 1997/08/04 16:18:45 os10000 |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
255 ;; Added Raise/Lower item. |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
256 ;; |
19143
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
257 ;; Revision 1.3 1997/08/03 12:47:26 os10000 |
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
258 ;; Cleaned up variables, prefix and cursor position. |
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
259 ;; |
19102
b605b8dbb880
Cleaned up variables, prefix and cursor position.
Oliver Seidel <os10000@seidel-space.de>
parents:
19101
diff
changeset
|
260 ;; Revision 1.2 1997/08/03 12:15:28 os10000 |
b605b8dbb880
Cleaned up variables, prefix and cursor position.
Oliver Seidel <os10000@seidel-space.de>
parents:
19101
diff
changeset
|
261 ;; It appears to work. |
b605b8dbb880
Cleaned up variables, prefix and cursor position.
Oliver Seidel <os10000@seidel-space.de>
parents:
19101
diff
changeset
|
262 ;; |
19101
31ba6200863a
It appears to work.
Oliver Seidel <os10000@seidel-space.de>
parents:
19100
diff
changeset
|
263 ;; Revision 1.1 1997/08/03 12:15:13 os10000 |
31ba6200863a
It appears to work.
Oliver Seidel <os10000@seidel-space.de>
parents:
19100
diff
changeset
|
264 ;; Initial revision |
19100 | 265 ;; |
266 | |
267 ;; --------------------------------------------------------------------------- | |
268 | |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
269 ;;; Code: |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
270 |
19100 | 271 ;; User-configurable variables: |
272 | |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
273 (defvar todo-prefix "*/*" "TODO mode prefix for entries.") |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
274 (defvar todo-file-do "~/.todo-do" "TODO mode list file.") |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
275 (defvar todo-file-done "~/.todo-done" "TODO mode archive file.") |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
276 (defvar todo-mode-hook nil "TODO mode hooks.") |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
277 (defvar todo-ins-thresh 0 "TODO mode insertion accuracy.") |
19100 | 278 |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
279 |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
280 ;; 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
|
281 ;; 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
|
282 ;; |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
283 (defvar todo-time-string-format "%y-%02m-%02d %02H:%02M" |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
284 "TODO mode time string format for done entries. |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
285 For details see the variable `time-stamp-format'.") |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
286 |
19100 | 287 ;; --------------------------------------------------------------------------- |
288 | |
19188
56e1d94a7083
Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents:
19187
diff
changeset
|
289 ;; Get some outside help ... |
56e1d94a7083
Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents:
19187
diff
changeset
|
290 |
19100 | 291 (require 'time-stamp) |
19188
56e1d94a7083
Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents:
19187
diff
changeset
|
292 (require 'easymenu) |
56e1d94a7083
Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents:
19187
diff
changeset
|
293 |
56e1d94a7083
Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents:
19187
diff
changeset
|
294 ;; --------------------------------------------------------------------------- |
19100 | 295 |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
296 ;; Set up some helpful context ... |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
297 |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
298 (defvar todo-cats nil "TODO categories.") |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
299 (defvar todo-prv-lne 0 "previous line that I asked about.") |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
300 (defvar todo-prv-ans 0 "previous answer that I got.") |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
301 (defvar todo-mode-map nil "TODO mode keymap.") |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
302 (defvar todo-category-number 0 "TODO category number.") |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
303 |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
304 ;; --------------------------------------------------------------------------- |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
305 |
19179
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
306 (if todo-mode-map |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
307 nil |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
308 (let ((map (make-keymap))) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
309 (suppress-keymap map t) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
310 (define-key map "+" 'todo-cmd-forw) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
311 (define-key map "-" 'todo-cmd-back) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
312 (define-key map "e" 'todo-cmd-edit) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
313 (define-key map "f" 'todo-cmd-file) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
314 (define-key map "i" 'todo-cmd-inst) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
315 (define-key map "k" 'todo-cmd-kill) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
316 (define-key map "l" 'todo-cmd-lowr) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
317 (define-key map "n" 'todo-cmd-next) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
318 (define-key map "p" 'todo-cmd-prev) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
319 (define-key map "q" 'todo-cmd-done) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
320 (define-key map "r" 'todo-cmd-rais) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
321 (define-key map "s" 'todo-cmd-save) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
322 (setq todo-mode-map map))) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
323 |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
324 (defun todo-cat-slct () |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
325 (let ((todo-category-name (nth todo-category-number todo-cats))) |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
326 (setq mode-line-buffer-identification |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
327 (concat "Category: " todo-category-name)) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
328 (widen) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
329 (goto-char (point-min)) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
330 (search-forward (concat "--- " todo-category-name)) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
331 (setq begin (+ (point-at-eol) 1)) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
332 (search-forward "--- End") |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
333 (narrow-to-region begin (point-at-bol)) |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
334 (goto-char (point-min)))) |
19100 | 335 |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
336 (defun todo-cmd-forw () "Go forward to TODO list of next category." |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
337 (interactive) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
338 (let ((todo-cat-cnt (- (length todo-cats) 1))) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
339 (setq todo-category-number (if (< todo-category-number todo-cat-cnt) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
340 (+ todo-category-number 1) 0)) |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
341 (todo-cat-slct))) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
342 |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
343 (defun todo-cmd-back () "Go back to TODO list of previous category." |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
344 (interactive) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
345 (let ((todo-cat-cnt (- (length todo-cats) 1))) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
346 (setq todo-category-number (if (> todo-category-number 0) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
347 (- todo-category-number 1) todo-cat-cnt)) |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
348 (todo-cat-slct))) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
349 |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
350 (defun todo-cmd-prev () "Select previous entry of TODO list." |
19100 | 351 (interactive) |
352 (forward-line -1) | |
353 (beginning-of-line nil) | |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
354 (message "")) |
19100 | 355 |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
356 (defun todo-cmd-next () "Select next entry of TODO list." |
19100 | 357 (interactive) |
358 (forward-line 1) | |
359 (beginning-of-line nil) | |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
360 (message "")) |
19100 | 361 |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
362 (defun todo-cmd-save () "Save the TODO list." |
19100 | 363 (interactive) |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
364 (save-buffer)) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
365 |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
366 (defun todo-cmd-done () "Done with TODO list for now." |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
367 (interactive) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
368 (widen) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
369 (save-buffer) |
19102
b605b8dbb880
Cleaned up variables, prefix and cursor position.
Oliver Seidel <os10000@seidel-space.de>
parents:
19101
diff
changeset
|
370 (beginning-of-line nil) |
b605b8dbb880
Cleaned up variables, prefix and cursor position.
Oliver Seidel <os10000@seidel-space.de>
parents:
19101
diff
changeset
|
371 (message "") |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
372 (bury-buffer)) |
19100 | 373 |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
374 (defun todo-line () "Find current line in buffer." |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
375 (buffer-substring (point-at-bol) (point-at-eol))) |
19100 | 376 |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
377 (defun todo-cmd-edit () "Edit current TODO list entry." |
19100 | 378 (interactive) |
19187
9d37b4ab16b5
Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents:
19186
diff
changeset
|
379 (let ((todo-entry (read-from-minibuffer "Edit: " (todo-line)))) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
380 (delete-region (point-at-bol) (point-at-eol)) |
19187
9d37b4ab16b5
Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents:
19186
diff
changeset
|
381 (insert todo-entry) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
382 (beginning-of-line nil) |
19187
9d37b4ab16b5
Acted upon suggestion from Shane Holder <holder@rsn.hp.com>:
Oliver Seidel <os10000@seidel-space.de>
parents:
19186
diff
changeset
|
383 (message ""))) |
19100 | 384 |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
385 (defun todo-add-category (cat) "Add a new category to the TODO list." |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
386 (interactive) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
387 (save-window-excursion |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
388 (setq todo-cats (cons cat todo-cats)) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
389 (find-file todo-file-do) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
390 (widen) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
391 (goto-char (point-min)) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
392 (let ((posn (search-forward "-*- mode: todo; " 17 t))) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
393 (if (not (null posn)) (goto-char posn)) |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
394 (if (equal posn nil) |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
395 (progn |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
396 (insert "-*- mode: todo; \n") |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
397 (forward-char -1)) |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
398 (kill-line))) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
399 (insert (format "todo-cats: %S; -*-" todo-cats)) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
400 (forward-char 1) |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
401 (insert (format "%s --- %s\n--- End\n%s %s\n" |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
402 todo-prefix cat todo-prefix (make-string 75 ?-)))) |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
403 0) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
404 |
19179
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
405 (defun todo-cmd-inst () |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
406 "Insert new TODO list entry." |
19100 | 407 (interactive) |
19102
b605b8dbb880
Cleaned up variables, prefix and cursor position.
Oliver Seidel <os10000@seidel-space.de>
parents:
19101
diff
changeset
|
408 (beginning-of-line nil) |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
409 (let* ((todo-entry (concat todo-prefix " " |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
410 (read-from-minibuffer "New TODO entry: "))) |
19179
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
411 (temp-catgs todo-cats) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
412 (todo-hstry (cons 'temp-catgs (+ todo-category-number 1)))) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
413 (save-window-excursion |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
414 (setq todo-category |
19179
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
415 (read-from-minibuffer "Category: " |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
416 (nth todo-category-number todo-cats) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
417 nil nil todo-hstry)) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
418 |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
419 (let ((cat-exists (member todo-category todo-cats))) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
420 (setq todo-category-number |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
421 (if cat-exists |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
422 (- (length todo-cats) (length cat-exists)) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
423 (todo-add-category todo-category)))) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
424 (todo-show) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
425 (setq todo-prv-lne 0) |
19179
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
426 |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
427 (let ((todo-fst 1) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
428 (todo-lst (+ 1 (count-lines (point-min) (point-max))))) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
429 (while (> (- todo-lst todo-fst) todo-ins-thresh) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
430 (let* ((todo-cur (/ (+ todo-fst todo-lst) 2)) |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
431 (todo-ans (if (< todo-cur todo-lst) |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
432 (todo-ask-p todo-cur) nil))) |
19179
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
433 (if todo-ans |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
434 (setq todo-lst todo-cur) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
435 (setq todo-fst (+ todo-cur 1))))) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
436 |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
437 (setq todo-fst (/ (+ todo-fst todo-lst) 2)) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
438 ;; goto-line doesn't have the desired behavior in a narrowed buffer |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
439 (goto-char (point-min)) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
440 (forward-line (- todo-fst 1))) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
441 |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
442 (insert (concat todo-entry "\n")) |
19179
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
443 (forward-line -1)) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
444 (beginning-of-line nil) |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
445 (save-buffer) |
19179
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
446 (message ""))) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
447 |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
448 (defun todo-ask-p (lne) |
19179
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
449 "Ask whether entry is more important than at LNE." |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
450 (if (not (equal todo-prv-lne lne)) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
451 (progn |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
452 (setq todo-prv-lne lne) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
453 (goto-char (point-min)) |
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
454 (forward-line (- todo-prv-lne 1)) |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
455 (setq todo-prv-ans (y-or-n-p |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
456 (concat "More important than '" |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
457 (todo-line) "'? "))))) |
19179
dce72c66de1e
Fixed insertion routine with help from Trey Jackson
Oliver Seidel <os10000@seidel-space.de>
parents:
19166
diff
changeset
|
458 todo-prv-ans) |
19100 | 459 |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
460 (defun todo-cmd-kill () "Delete current TODO list entry." |
19100 | 461 (interactive) |
462 (if (> (count-lines (point-min) (point-max)) 0) | |
463 (progn | |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
464 (let* ((todo-entry (todo-line)) |
19186
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
465 (todo-answer (y-or-n-p (concat "Permanently remove '" |
023404dbc696
Improved documentation. Broke some lines to comply with
Oliver Seidel <os10000@seidel-space.de>
parents:
19180
diff
changeset
|
466 todo-entry "'? ")))) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
467 (if todo-answer |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
468 (progn |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
469 (delete-region (point-at-bol) (+ 1 (point-at-eol))) |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
470 (forward-line -1)))) |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
471 (message "")) |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
472 (error "No TODO list entry to delete")) |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
473 (beginning-of-line nil)) |
19100 | 474 |
19143
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
475 (defun todo-cmd-rais () "Raise priority of current entry." |
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
476 (interactive) |
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
477 (if (> (count-lines (point-min) (point-max)) 0) |
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
478 (progn |
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
479 (setq todo-entry (todo-line)) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
480 (delete-region (point-at-bol) (+ 1 (point-at-eol))) |
19143
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
481 (forward-line -1) |
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
482 (insert (concat todo-entry "\n")) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
483 (forward-line -1) |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
484 (message "")) |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
485 (error "No TODO list entry to raise")) |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
486 (beginning-of-line nil)) |
19143
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
487 |
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
488 (defun todo-cmd-lowr () "Lower priority of current entry." |
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
489 (interactive) |
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
490 (if (> (count-lines (point-min) (point-max)) 0) |
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
491 (progn |
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
492 (setq todo-entry (todo-line)) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
493 (delete-region (point-at-bol) (+ 1 (point-at-eol))) |
19143
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
494 (forward-line 1) |
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
495 (insert (concat todo-entry "\n")) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
496 (forward-line -1) |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
497 (message "")) |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
498 (error "No TODO list entry to lower")) |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
499 (beginning-of-line nil)) |
19143
96a5705f73d5
Added Raise/Lower item.
Oliver Seidel <os10000@seidel-space.de>
parents:
19102
diff
changeset
|
500 |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
501 (defun todo-cmd-file () "File away the current TODO list entry." |
19100 | 502 (interactive) |
503 (if (> (count-lines (point-min) (point-max)) 0) | |
504 (progn | |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
505 (let ((todo-comment (read-from-minibuffer "Comment: ")) |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
506 (time-stamp-format todo-time-string-format)) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
507 (beginning-of-line nil) |
19166
8af428cb3906
Incorporated menus for XEmacs from Allan.Cochrane@soton.sc.philips.com,
Oliver Seidel <os10000@seidel-space.de>
parents:
19165
diff
changeset
|
508 (delete-region (point-at-bol) (search-forward todo-prefix)) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
509 (insert (time-stamp-string)) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
510 (end-of-line nil) |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
511 (insert (concat " (" todo-comment ")")) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
512 (append-to-file (point-at-bol) (+ 1 (point-at-eol)) todo-file-done) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
513 (delete-region (point-at-bol) (+ 1 (point-at-eol))) |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
514 (forward-line -1)) |
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
515 (message "")) |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
516 (error "No TODO list entry to file away")) |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
517 (beginning-of-line nil)) |
19100 | 518 |
519 ;; --------------------------------------------------------------------------- | |
520 | |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
521 ;; utility functions: These are available in XEmacs, but not in Emacs 19.34 |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
522 |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
523 (if (not (fboundp 'point-at-bol)) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
524 (defun point-at-bol () |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
525 (save-excursion |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
526 (beginning-of-line) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
527 (point)))) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
528 |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
529 (if (not (fboundp 'point-at-eol)) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
530 (defun point-at-eol () |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
531 (save-excursion |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
532 (end-of-line) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
533 (point)))) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
534 |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
535 ;; --------------------------------------------------------------------------- |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
536 |
19188
56e1d94a7083
Applied patch from Istvan Marko <istvan@cmdmail.amd.com>
Oliver Seidel <os10000@seidel-space.de>
parents:
19187
diff
changeset
|
537 (easy-menu-define todo-menu todo-mode-map "Todo Menu" |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
538 '("Todo" |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
539 ["Next category" todo-cmd-forw t] |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
540 ["Previous category" todo-cmd-back t] |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
541 "---" |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
542 ["Edit item" todo-cmd-edit t] |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
543 ["File item" todo-cmd-file t] |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
544 ["Insert new item" todo-cmd-inst t] |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
545 ["Kill item" todo-cmd-kill t] |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
546 "---" |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
547 ["Lower item priority" todo-cmd-lowr t] |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
548 ["Raise item priority" todo-cmd-rais t] |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
549 "---" |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
550 ["Next item" todo-cmd-next t] |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
551 ["Previous item" todo-cmd-prev t] |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
552 "---" |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
553 ["Save" todo-cmd-save t] |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
554 "---" |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
555 ["Quit" todo-cmd-done t] |
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
556 )) |
19166
8af428cb3906
Incorporated menus for XEmacs from Allan.Cochrane@soton.sc.philips.com,
Oliver Seidel <os10000@seidel-space.de>
parents:
19165
diff
changeset
|
557 |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
558 (defun todo-mode () "Major mode for editing TODO lists.\n\n\\{todo-mode-map}" |
19100 | 559 (interactive) |
560 (setq major-mode 'todo-mode) | |
561 (setq mode-name "TODO") | |
562 (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
|
563 (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
|
564 (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
|
565 |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
566 (defun todo-show () "Show TODO list." |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
567 (interactive) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
568 (find-file todo-file-do) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
569 (if (null todo-cats) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
570 (progn |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
571 (todo-add-category "Todo") |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
572 (goto-char (point-min)) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
573 (goto-char (search-forward "--- End")) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
574 (let ((bol (point-at-bol))) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
575 (forward-line 1) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
576 (let* ((eol (+ (point-at-eol) 1)) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
577 (mrkr (buffer-substring bol eol))) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
578 (delete-region bol eol) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
579 (goto-char (point-max)) |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
580 (insert mrkr))) |
19165
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
581 (save-buffer) |
9bf7fc374b58
Added improvements from Ron Gut <rgut@aware.com>.
Oliver Seidel <os10000@seidel-space.de>
parents:
19143
diff
changeset
|
582 (kill-buffer (current-buffer)) |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
583 (find-file todo-file-do))) |
19102
b605b8dbb880
Cleaned up variables, prefix and cursor position.
Oliver Seidel <os10000@seidel-space.de>
parents:
19101
diff
changeset
|
584 (beginning-of-line nil) |
19189
1519cf07cfab
Fixed header, typos, layout, documentation.
Oliver Seidel <os10000@seidel-space.de>
parents:
19188
diff
changeset
|
585 (todo-cat-slct)) |
19100 | 586 |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
587 (provide 'todo-mode) |
19100 | 588 |
589 ;; --------------------------------------------------------------------------- | |
590 | |
19436
38aa295db414
- changed name to todo-mode
Oliver Seidel <os10000@seidel-space.de>
parents:
19189
diff
changeset
|
591 ;;; todo-mode.el ends here |
19100 | 592 |
593 ;; --------------------------------------------------------------------------- |