comparison lisp/calendar/todo-mode.el @ 19143:96a5705f73d5

Added Raise/Lower item.
author Oliver Seidel <os10000@seidel-space.de>
date Mon, 04 Aug 1997 16:18:45 +0000
parents b605b8dbb880
children 9bf7fc374b58
comparison
equal deleted inserted replaced
19142:fffebc19fe53 19143:96a5705f73d5
4 4
5 ;; Note: You may copy this file freely for non-commercial use; otherwise, 5 ;; Note: You may copy this file freely for non-commercial use; otherwise,
6 ;; please contact (address) O Seidel, Lessingstr 8, Eschborn, FRG 6 ;; please contact (address) O Seidel, Lessingstr 8, Eschborn, FRG
7 ;; (e-mail ) Oliver.Seidel@cl.cam.ac.uk (2 Aug 1997) 7 ;; (e-mail ) Oliver.Seidel@cl.cam.ac.uk (2 Aug 1997)
8 8
9 ;; $Id: todomode.el,v 1.2 1997/08/03 12:15:28 os10000 Exp os10000 $ 9 ;; $Id: todomode.el,v 1.3 1997/08/03 12:47:26 os10000 Exp os10000 $
10 ;; 10 ;;
11 ;; $Log: todomode.el,v $ 11 ;; $Log: todomode.el,v $
12 ;; Revision 1.3 1997/08/03 12:47:26 os10000
13 ;; Cleaned up variables, prefix and cursor position.
14 ;;
12 ;; Revision 1.2 1997/08/03 12:15:28 os10000 15 ;; Revision 1.2 1997/08/03 12:15:28 os10000
13 ;; It appears to work. 16 ;; It appears to work.
14 ;; 17 ;;
15 ;; Revision 1.1 1997/08/03 12:15:13 os10000 18 ;; Revision 1.1 1997/08/03 12:15:13 os10000
16 ;; Initial revision 19 ;; Initial revision
30 ;; n for the next entry 33 ;; n for the next entry
31 ;; q to save the list and exit the buffer 34 ;; q to save the list and exit the buffer
32 ;; e to edit the current entry 35 ;; e to edit the current entry
33 ;; i to insert a new entry 36 ;; i to insert a new entry
34 ;; k to kill the current entry 37 ;; k to kill the current entry
38 ;; r raise current entryk's priority
39 ;; l lower the current entry's priority
35 ;; f to file the current entry, including a 40 ;; f to file the current entry, including a
36 ;; comment and timestamp 41 ;; comment and timestamp
37 ;; 42 ;;
38 ;; I would recommend to add the following bindings to your global keymap: 43 ;; I would recommend to add the following bindings to your global keymap:
39 ;; 44 ;;
73 (define-key todo-mode-map "n" 'todo-cmd-next) 78 (define-key todo-mode-map "n" 'todo-cmd-next)
74 (define-key todo-mode-map "q" 'todo-cmd-done) 79 (define-key todo-mode-map "q" 'todo-cmd-done)
75 (define-key todo-mode-map "e" 'todo-cmd-edit) 80 (define-key todo-mode-map "e" 'todo-cmd-edit)
76 (define-key todo-mode-map "i" 'todo-cmd-inst) 81 (define-key todo-mode-map "i" 'todo-cmd-inst)
77 (define-key todo-mode-map "k" 'todo-cmd-kill) 82 (define-key todo-mode-map "k" 'todo-cmd-kill)
83 (define-key todo-mode-map "r" 'todo-cmd-rais)
84 (define-key todo-mode-map "l" 'todo-cmd-lowr)
78 (define-key todo-mode-map "f" 'todo-cmd-file) 85 (define-key todo-mode-map "f" 'todo-cmd-file)
79 86
80 (defun todo-cmd-prev () "Select previous entry." 87 (defun todo-cmd-prev () "Select previous entry."
81 (interactive) 88 (interactive)
82 (forward-line -1) 89 (forward-line -1)
165 ) 172 )
166 (beginning-of-line nil) 173 (beginning-of-line nil)
167 (message "") 174 (message "")
168 ) 175 )
169 176
177 (defun todo-cmd-rais () "Raise priority of current entry."
178 (interactive)
179 (if (> (count-lines (point-min) (point-max)) 0)
180 (progn
181 (setq todo-entry (todo-line))
182 (delete-region todo-begin (+ 1 todo-end))
183 (forward-line -1)
184 (insert (concat todo-entry "\n"))
185 (forward-char -1)
186 )
187 (message "No entry to raise.")
188 )
189 (beginning-of-line nil)
190 (message "")
191 )
192
193 (defun todo-cmd-lowr () "Lower priority of current entry."
194 (interactive)
195 (if (> (count-lines (point-min) (point-max)) 0)
196 (progn
197 (setq todo-entry (todo-line))
198 (delete-region todo-begin (+ 1 todo-end))
199 (forward-line 1)
200 (insert (concat todo-entry "\n"))
201 (forward-char -1)
202 )
203 (message "No entry to raise.")
204 )
205 (beginning-of-line nil)
206 (message "")
207 )
208
170 (defun todo-cmd-file () "File away the current todo list entry." 209 (defun todo-cmd-file () "File away the current todo list entry."
171 (interactive) 210 (interactive)
172 (if (> (count-lines (point-min) (point-max)) 0) 211 (if (> (count-lines (point-min) (point-max)) 0)
173 (progn 212 (progn
174 (setq time-stamp-format " %2d, %y, %02I:%02M%p %b") 213 (setq time-stamp-format " %2d, %y, %02I:%02M%p %b")