emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Dr Wozniak’s tasklist implementation


From: Bob Newell
Subject: Re: [O] Dr Wozniak’s tasklist implementation
Date: Wed, 01 Feb 2017 14:52:17 -1000
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.3 (gnu/linux)

Aloha kakou,

I started to find the above idea pretty interesting, and so I did a
small proof of concept coding to implement it. (Certainly this could be
done a lot better but I just wanted to try it out.)

I'm going to work with the idea for a little while to see how well it
helps in sorting through tasks.

Bob Newell
Honolulu, Hawai`i

* Sent via Ma Gnus 0.14-Emacs 24.3-Linux Mint 17.3 *

----

;; Implement supermemo style task list processing via org-mode tables.

;; Usage: M-x org-tasklist-add and follow the prompts. If you use it a
;; lot, tie it to a function key or something fast and useful.

;; The task table file, tasks.org, goes to the org default directory,
;; and is created if it doesn't yet exist.

;; Tasks have an input value (in any units you like), time (in any
;; units you like) and a description. Priority is then calculated as
;; value/time and the table is sorted from highest value at top to
;; lowest value at bottom.

;; This is /not/ integrated with the org-mode agenda. That is keeping
;; with the philsophy explained by Dr. Wozniak, that tasks with
;; time-constraints should be avoided if possible and scheduled
;; separately when they cannot be avoided. (This seems like a fair
;; amount of wishful thinking.) But in any case, high-priority or
;; high-value items can be manually added to the agenda if so
;; desired. (I don't yet have an automated function for this.)

;; I think the task table could contain many items, none of them (yet)
;; urgent. It may be a way of prioritizing future work (chosing the
;; most valuable work), which later gets projectized (perhaps) and
;; scheduled. What the table can surely do, which I think is of much
;; merit, is screen out low value projects and tasks that simply
;; aren't worth doing, either on their own merit or compared with
;; higher payback items.

(defun org-tasklist-sort ()
"Sort org tasklist"
 (interactive)
 (goto-char (point-min))
 (search-forward "#+TBLNAME: org-tasklist" nil 2)
 (forward-line 3)
 (forward-char 2)
 (org-table-sort-lines nil ?N)
)

(defun org-tasklist-add (value hours description)
"Add a task to tasklist"
 (interactive "nValue: \nnTime: \nsDescription: ")
 (find-file (concat org-directory "tasks.org"))
 (goto-char (point-min))
 (while (not (search-forward "#+TBLNAME: org-tasklist" nil 2))
   (insert "\n#+TBLNAME: org-tasklist\n")
   (insert "|Priority|Value|Time|Task Description|\n")
   (forward-line -1)
   (org-table-insert-hline)
   (forward-line 2)
   (insert "#+TBLFM: $1=$2/$3\n")
   (goto-char (point-min))
 )
 (forward-line 3)
 (insert (format "|  | %f | %f | %s |\n" value hours description))
 (forward-line -1)
 (org-table-align)
 (org-table-iterate) 
 (org-tasklist-sort) 
)

-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]