1 <?xml version=
"1.0" encoding=
"utf-8" ?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 <html xmlns=
"http://www.w3.org/1999/xhtml">
6 <title>planner-cke.el
</title>
7 <meta name=
"generator" content=
"muse.el" />
8 <meta http-equiv=
"Content-Type"
9 content=
"text/html; charset=utf-8" />
10 <link href=
"http://feeds.unknownlamer.org/rss/site-updates"
11 rel=
"alternate" type=
"application/rss+xml" title=
"Updates Feed" />
13 <link rel=
"stylesheet" href=
"default.css" />
16 <h1>planner-cke.el
</h1>
17 <div class=
"contents">
23 <!-- Page published by Emacs Muse begins here --><p>;;; Planner Mode Settings
24 (require 'planner)
</p>
27 (setq planner-carry-tasks-forward
1)
28 (setq planner-project
"clintons-plans
")
</p>
30 <p>(setq planner-use-other-window nil)
</p>
32 <p>;;; Planner template
33 (setq planner-day-page-template
34 <p style=
"text-align: center;">
35 "* Tasks\n\n\n* Schedule\n\n\n* Notes\n\n\n* Timeclock\n\n\n* Accomplishments\n\n
")
38 <p>;;; General Key Bindings
39 (global-set-key [?\C-c ?p ?p] #'plan)
40 (global-set-key [?\C-c ?p ?d] #'planner-goto-today)
41 (global-set-key [?\C-c ?p ?b] #'planner-create-task-from-buffer)
42 (global-set-key [?\C-c ?p ?B] #'cke-planner-create-task-from-buffer-extended)
43 (global-set-key [?\C-c ?p ?t] #'planner-create-task)
44 (global-set-key [?\C-c ?p ?T] #'cke-planner-create-task-extended)
45 (global-set-key [?\C-c ?r] #'remember)
</p>
47 <p>;; My emacs runs continually and this ensures that my todo list will
48 ;; be in front of me when I wake up in the morning
49 (add-hook 'midnight-hook #'(lambda ()
50 <p style=
"text-align: center;">
51 ;; Rebind hook to nil to supress prompts
52 ;; for auto created cyclic tasks
53 (let ((planner-create-task-hook nil)
54 ;; Only try to create cyclic tasks
55 ;; when new page is created
56 ;; automatically because it is
57 ;; annoying as hell to have the
58 ;; prompts for my cyclic tasks to
59 ;; come up when scheduling future
61 (planner-mode-hook (cons #'planner-cyclic-create-tasks-maybe
66 <p>;;; Extra task interfaces
67 (require 'planner-w3m)
68 (require 'planner-bibtex)
69 (require 'planner-bookmark)
</p>
71 <p>(require 'planner-publish)
</p>
73 <p>(setq planner-html-inner-header
74 <p style=
"text-align: center;">
75 "<calendar arrows=\
"t\
">
79 <p>(setq planner-calendar-prev-month-button
80 <p style=
"text-align: center;">
82 (setq planner-calendar-next-month-button
87 (require 'remember-planner)
88 (setq remember-handler-functions '(remember-planner-append))
89 (setq remember-annotation-functions planner-annotation-functions)
</p>
91 <p>;; Local Keybindings
92 (define-key planner-mode-map [?\C-c ?n] #'planner-create-note-from-task)
93 (define-key planner-mode-map [?\C-c ?d] #'planner-deadline-change)
</p>
95 <p>(require 'planner-gnus)
96 (planner-gnus-insinuate)
</p>
98 <p>;; Prompt for a deadline in addition to start date when creating new tasks
99 (require 'planner-deadline)
</p>
101 <p>(planner-calendar-insinuate)
102 (define-key global-map [?\C-c ?p ?c] #'calendar)
</p>
105 <p>;;; Ranking customizations
106 (require 'planner-rank)
</p>
108 <p>;; Asks for importance before deadline to allow adding importance to
109 ;; tasks without a deadline.
110 (defun cke-planner-deadline-add (date)
112 <p class=
"quoted">(interactive (list (planner-read-date nil t)))
113 ;; Overload this for the extent because I don't care
114 ;; about manually setting the urgency; a task lacking a
115 ;; deadline is for me one with 'average' urgency.
116 (cond (date (planner-deadline-add date))
118 (flet ((planner-rank-read-importance-and-urgency
122 (read-string
"Importance:
"
126 planner-rank-default-importance)))
127 planner-rank-default-urgency)))
128 (planner-rank-change)))))
</p>
131 <p>(defun cke-planner-call-extended (fun)
133 <p class=
"quoted">(let ((planner-create-task-hook
135 (call-interactively #'cke-planner-deadline-add))
136 planner-create-task-hook)))
137 (call-interactively fun)))
</p>
140 <p>(defun cke-planner-create-task-extended ()
142 <p class=
"quoted">"Prompt for deadline and/or importance when creating a task
"
144 (cke-planner-call-extended #'planner-create-task))
</p>
147 <p>(defun cke-planner-create-task-from-buffer-extended ()
149 <p class=
"quoted">"Prompt for deadline and/or importance when creating a task from a buffer
"
151 (cke-planner-call-extended #'planner-create-task-from-buffer))
</p>
154 <p>(setq planner-sort-tasks-key-function
155 <p style=
"text-align: center;">
156 <a name=
"'planner-sort-tasks-by-rank)" id=
"'planner-sort-tasks-by-rank)"></a>
159 <p>(setq planner-rank-importance-vs-urgency-factor
1.5)
</p>
161 <p>(setq planner-rank-priority-A-valve
6.49)
162 (setq planner-rank-priority-B-valve
4.49)
</p>
164 <p>;;; note: tenative
165 ;(setq planner-rank-deadline-urgency-map-list '(-
1 0 4 10 21 30 90 180 365))
</p>
167 <p>(define-key planner-mode-map [?\C-c ?i] #'planner-rank-change)
</p>
170 (require 'planner-cyclic)
</p>
172 <p>(setq planner-cyclic-diary-file
"~/plans/diary.cyclic-tasks
")
</p>
174 <p>;; Cyclic tasks are only created when #'plan is run by midnight-mode
175 (remove-hook 'planner-mode-hook 'planner-cyclic-create-tasks-maybe)
</p>
178 (require 'planner-id)
</p>
180 <p>(setq planner-id-tracking-file
"~/plans/.planner-id
")
</p>
184 (defun cke-planner-get-annot ()
186 <p class=
"quoted">(interactive)
187 (kill-new (or (run-hook-with-args-until-success
188 'planner-annotation-functions)
192 <p>(define-key global-map [?\C-c ?p ?a] #'cke-planner-get-annot)
</p>
194 <p>(require 'planner-schedule)
195 ;(require 'planner-timeclock)
196 ;(require 'planner-timeclock-summary)
</p>
198 <p>(setq timeclock-file (cke-personal-file
"timelog
"))
</p>
200 <p>;(planner-timeclock-summary-insinuate)
</p>
202 <p>(define-key planner-mode-map [?\C-c ?\C-o] #'(lambda ()
203 <p style=
"text-align: center;">
209 <p>(require 'planner-calendar)
</p>
211 <p>(setq planner-calendar-today-page-name
"index
")
</p>
213 <p>;;
2018-
10-
26 seems to be broken...
214 ;(eval-after-load
"muse-publish
"</p>
218 <p>(require 'planner-accomplishments)
</p>
220 <p>(setq planner-accomplishments-status-display
221 <p style=
"text-align: center;">
222 '((
"_
" .
"Unfinished
")
223 ; (
"o
" .
"In progress
")
224 ; (
"D
" .
"Delegated
")
225 (
"P
" .
"Postponed
")
226 (
"X
" .
"Completed
")
227 (
"C
" .
"Cancelled
")))
230 <p>(planner-accomplishments-insinuate)
</p>
232 <p>;;; Special task creation functions
</p>
234 <p>(defun cke-planner-create-book-tasks-range (title start end)
236 <p class=
"quoted">"Create undated tasks for reading individual sections of a
238 (interactive
"MTitle: \nnStart: \nnEnd:
")
239 (dotimes (chapter-base (- (
1+ end) start))
240 (planner-create-task (format
"Reading: %s: Chapter %d
"
241 title (+ chapter-base start))
242 nil nil
"Reading
" "P
")))
</p>
245 <p>(defun cke-planner-create-book-tasks (title chapters)
247 <p class=
"quoted">"Create undated tasks for reading individual sections of a
249 (interactive
"MTitle: \nnChapters:
")
250 (cke-planner-create-book-tasks-range title
1 chapters))
</p>
253 <p>(defun cke-planner-create-bicycle-light-tasks ()
255 <p class=
"quoted">(interactive)
256 (let ((cke-date (planner-read-date))
257 (planner-default-task-priority
"A
"))
258 (mapc (lambda (task-description)
259 (planner-create-task task-description cke-date nil
"Bicycle
"))
260 '(
"Charge headlight
"
261 "Charge LD-
600 AAAs
"
262 "Charge LD-
1000 AAs
"))))
</p>
265 <p>(global-set-key [?\C-c ?p ?e ?b] #'cke-planner-create-book-tasks)
266 (global-set-key [?\C-c ?p ?e ?B] #'cke-planner-create-book-tasks-range)
267 (global-set-key [?\C-c ?p ?e ?l] #'cke-planner-create-bicycle-light-tasks)
</p>
270 <p>;;; Diary Integration
271 ;; (require 'planner-diary)
</p>
273 <p>(setq diary-file
"~/plans/diary
")
274 ;; (add-hook 'diary-display-hook 'fancy-diary-display)
</p>
276 <p>;; (setq planner-diary-string
"* Schedule
")
277 ;; (setq planner-diary-use-diary t)
278 ;; (planner-diary-insinuate)
</p>
281 (require 'planner-appt)
</p>
283 <p>(setq planner-appt-task-use-appointments-section-flag t)
</p>
285 <p>(planner-appt-use-tasks)
286 (planner-appt-insinuate)
</p>
289 (require 'planner-bbdb)
</p>
291 <p>;;; VC Integration
292 (require 'planner-log-edit)
</p>
294 <p>;;; Misc Local Keybindings
295 (define-key planner-mode-map [?\C-c (control shift ?p)] #'planner-task-pending)
</p>
300 <p class=
"quoted">'(planner-cancelled-task-face ((t (:foreground
"gray70
" :strike-through
"red
" :height
0.85))))
301 '(planner-completed-task-face ((t (:foreground
"gray70
" :strike-through
"green
" :height
0.85))))
302 '(planner-low-priority-task-face ((t (:foreground
"cyan
")))))
</p>
305 <p>;;; Works in Progress
</p>
308 ;;
1. overlay modification hooks
310 ;; b. modifying overlay when text length changes
313 ;;
3. integrate with planner
314 ;; a. use planner deadline functions to match task deadline
316 ;; i. manage overlay size when task is changed
317 ;; c. hook into planner
319 ;; a. create a category for the deadline overlay
320 ;; i. move properties from function to plist on category
321 (defun cke-planner-overlay-test ()
323 <p class=
"quoted">(save-selected-window
324 (switch-to-buffer (get-buffer-create
"<em>foo
</em>"))
325 (let ((cke-overlay (or (car (overlays-at
8))
326 (make-overlay
8 13))))
327 (overlay-put cke-overlay 'before-string
"foo1
")
328 (overlay-put cke-overlay 'invisible t))))
</p>
331 <p>;; Version control integration
332 (defun vc-darcs-init-version ()
334 <p class=
"quoted">nil)
</p>
337 <p>;; this needs to only try to check in new files of the planner
338 ;; project, and then only when they are real files and not transient
340 (defadvice planner-prepare-file (after cke-planner-darcs-add
341 <p style=
"text-align: center;">
343 "Add empty planner files to the current darcs repo if the
344 planner projects under vc
"
345 (set-buffer-modified-p t)
347 (when (and (buffer-file-name)
348 (eq (muse-project-of-file (buffer-file-name))
350 (let ((vc-default-init-version nil))
351 (if (not (condition-case nil
352 (vc-register nil nil)
354 (vc-checkin (buffer-file-name) nil
"Initial Checkin
")))))
357 <p>(ad-unadvise #'planner-prepare-file)
</p>
358 <!-- Page published by Emacs Muse ends here -->
360 <p class=
"cke-buttons">
361 <!-- validating badges, any browser, etc -->
362 <a href=
"http://validator.w3.org/check/referer"><img
363 src=
"http://www.w3.org/Icons/valid-xhtml10"
364 alt=
"Valid XHTML 1.0!" /></a>
366 <a href=
"http://www.anybrowser.org/campaign/"><img
367 src=
"img/buttons/w3c_ab.png" alt=
"[ Viewable With Any Browser
370 <a href=
"http://www.debian.org/"><img
371 src=
"img/buttons/debian.png" alt=
"[ Powered by Debian ]" /></a>
373 <a href=
"http://hcoop.net/">
374 <img src=
"img/buttons/hcoop.png"
375 alt=
"[ Hosted by HCoop]" />
378 <a href=
"http://www.fsf.org/register_form?referrer=114">
379 <img src=
"img/buttons/fsf_member.png"
380 alt=
"[ FSF Associate Member ]" />
384 <p class=
"cke-footer">Mike: I WAS NOT MICROWAVED.
386 <p class=
"cke-timestamp">Last Modified: