;ELC ;;; Compiled by proclus@darwintel on Wed Jan 2 12:11:49 2008 ;;; from file /mnt/gmirror/ports/deskutils/etask/work/etask-0.3.91a/etask-db.el ;;; in Emacs version 21.2.1 ;;; with bytecomp version 1.1.1.4 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`etask-db.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #@15 Task name ID. (defconst etask-db-attr-taskname 100 (#$ . 633)) #@43 Index of task name within task structure. (defconst etask-db-ix-taskname 0 (#$ . 702)) #@18 Project name ID. (defconst etask-db-attr-projname 110 (#$ . 795)) #@46 Index of project name within task structure. (defconst etask-db-ix-projname 1 (#$ . 867)) #@24 Tracking algorithm ID. (defconst etask-db-attr-tracking 120 (#$ . 963)) #@52 Index of tracking algorithm within task structure. (defconst etask-db-ix-tracking 2 (#$ . 1041)) #@15 Task type ID. (defconst etask-db-attr-tasktype 130 (#$ . 1144)) #@43 Index of task type within task structure. (defconst etask-db-ix-tasktype 3 (#$ . 1214)) #@20 Planned effort ID. (defconst etask-db-attr-peffort 140 (#$ . 1308)) #@48 Index of planned effort within task structure. (defconst etask-db-ix-peffort 4 (#$ . 1382)) #@21 Expended effort ID. (defconst etask-db-attr-eeffort 150 (#$ . 1480)) #@49 Index of expended effort within task structure. (defconst etask-db-ix-eeffort 5 (#$ . 1555)) #@16 Task begin ID. (defconst etask-db-attr-taskbegin 160 (#$ . 1654)) #@21 Task begin time ID. (defconst etask-db-attr-taskbegintime 161 (#$ . 1726)) #@44 Index of task begin within task structure. (defconst etask-db-ix-taskbegin 6 (#$ . 1807)) #@14 Task end ID. (defconst etask-db-attr-taskend 170 (#$ . 1903)) #@19 Task end time ID. (defconst etask-db-attr-taskendtime 171 (#$ . 1971)) #@42 Index of task end within task structure. (defconst etask-db-ix-taskend 7 (#$ . 2048)) #@10 Mark ID. (defconst etask-db-attr-mark 180 (#$ . 2140)) #@38 Index of mark within task structure. (defconst etask-db-ix-mark 8 (#$ . 2201)) #@14 Priority ID. (defconst etask-db-attr-priority 190 (#$ . 2286)) #@42 Index of priority within task structure. (defconst etask-db-ix-priority 9 (#$ . 2355)) #@14 Category ID. (defconst etask-db-attr-category 200 (#$ . 2448)) #@42 Index of category within task structure. (defconst etask-db-ix-category 10 (#$ . 2517)) #@12 Policy ID. (defconst etask-db-attr-policy 210 (#$ . 2611)) #@97 Index of policy within task structure. The policy deals with the issue of missing the deadline. (defconst etask-db-ix-policy 11 (#$ . 2676)) #@12 People ID. (defconst etask-db-attr-people 220 (#$ . 2823)) #@40 Index of people within task structure. (defconst etask-db-ix-people 12 (#$ . 2888)) #@19 Argument list ID. (defconst etask-db-attr-arglist 230 (#$ . 2978)) #@65 Index of list with other task attributes within task structure. (defconst etask-db-ix-arglist 13 (#$ . 3051)) #@14 Sub task ID. (defconst etask-db-attr-subtasklist 240 (#$ . 3167)) #@47 Index of sub task list within task structure. (defconst etask-db-ix-subtasklist 14 (#$ . 3239)) #@121 Return true if ELEMENT's structure and content seems to be ok, nil otherwise. Checks just the most important things... (defalias 'etask-element-is-valid-p #[(element) "\306 \"\306\n\"\306 \"\306\f\" \n <\205\203\205\203\306\f\";\205\203\306 \";\205\203\306\";\205\203\306\";\205\203 \247\205\203 \307Y\205\203 \247\205\203 \307Y\205\203 \205\203\310 !\205\203\n\205\203\310\n!\205\203\306\";\205\203\306\"<,\207" [element etask-db-attr-taskbegin etask-db-attr-taskend etask-db-attr-peffort etask-db-attr-eeffort eeffort etask-db-get 0 etask-calendardate-is-legal-p peffort enddate begindate etask-db-attr-taskname etask-db-attr-projname etask-db-attr-tracking etask-db-attr-tasktype etask-db-attr-mark etask-db-attr-subtasklist] 6 (#$ . 3342)]) #@211 Update existing or store new ELEMENTS in current item buffer. If optional CATID and ITEM define a valid item its buffer is used instead. If optional ERASE is non-nil erase the buffer before storing ELEMENTS. (defalias 'etask-write-elements #[(elements &optional catid item erase) "\203 \203\305 \"\202\306 r\nq\210 \2038\307 \210\f\203Ndb\210n\204+\310c\210\311\f@\n\"\210\fA\211\202\f\203N\312\f@!\210\311\f@\n\"\210\fA\211\204<\313 *\207" [catid item buf erase elements etask-cat-get-itembuffer etask-cat-get-current-itembuffer erase-buffer "\n" etask-write-op etask-write-kill-and-goto-pos save-buffer] 4 (#$ . 4142)]) #@1358 Update an existing or store a new ELEMENT. If the element name in ELEMENT already exists its data is updated. If INDEX is non-nil ELEMENT is stored at INDEX. If optional CATID and ITEM are non-nil, this specified item file is used instead of the current item file. If optional CATID and ITEM are nil but optional BUF is non-nil then buffer BUF is the target of this write operation. ELEMENT is a list containing all information regarding this element. Here is its structure: 0 ELEMENTNAME...string 1 ITEMNAME...string 2 TRACKING...string in `etask-tracking-algorithms-alist' 3 ELEMENTTYPE...string in {`etask-normaltask-string', `etask-highrisktask-string', `etask-criticaltask-string'} 4 PLANNED_EFFORT...the planned effort in hours, a nonnegative integer 5 EXPENDED_EFFORT...the already expended effort in hours, a nn integer 6 BEGIN...date (mm dd yyyy), optional time (h m s) Examples: (6 16 2004) or ((6 16 2004) (14 0 0)) 7 END...date (mm dd yyyy), optional time (h m s) 8 MARK...string in {'u', 'm'}, where 'u' means unmarked and 'm' stands for marked 9 PRIORITY...non-negative integer 10 CATEGORY...string 11 POLICY...string 12 PEOPLE...string list 13 ARGLIST...other attributes in a list 14 SUBELEMENTLIST...list of subelements (defalias 'etask-write-element #[(element &optional index catid item buf) "\203 \203\305 \"\202!\204 \204\n\203\n\202!\306 r\nq\210\307 \f\"\210\310 \n\"\210\311 \210*\312\207" [catid item buf element index etask-cat-get-itembuffer etask-cat-get-current-itembuffer etask-write-kill-and-goto-pos etask-write-op save-buffer t] 3 (#$ . 4792)]) #@61 Delete old element if necessary and go to correct position. (defalias 'etask-write-kill-and-goto-pos #[(element &optional index) "\304 \"eb\210\305\306\n!\307\310#\203\311y\210\312 \202; \2031eb\210 Sy\210\313 W\205;\314c\202;db\210n?\205;\314c)\207" [element etask-db-attr-taskname name index etask-db-get search-forward etask-get-elementregexp nil t 0 kill-line etask-current-line "\n"] 4 (#$ . 6512)]) #@28 Write ELEMENT into BUFFER. (defalias 'etask-write-op #[(element buffer) "\302 \"\210l?\205\f\303c\207" [element buffer prin1 "\n"] 3 (#$ . 6933)]) #@70 Return INPUTSTRINGs effort in days for units hours, days, and weeks. (defalias 'etask-extract-effort-days #[(inputstring) "\302! \245\207" [inputstring etask-workinghours-per-day etask-extract-effort-hours] 2 (#$ . 7088)]) #@91 Return INPUTSTRINGs effort for days, weeks, and months raw, i.e. without the unit symbol. (defalias 'etask-extract-effort-raw #[(inputstring) "\303 \"\205\304 \303\n \"\305\225O!\207" [etask-effort-dwm-regexp inputstring etask-effort-num-regexp string-match string-to-number 0] 5 (#$ . 7318)]) #@115 Return INPUTSTRINGs effort in hours for units m, h, d, and w, i.e. minutes, hours, days, and weeks, respectively. (defalias 'etask-extract-effort-hours #[(inputstring) "\306\307 \"\310\225O!\307 \"\205\307\f\"\310\225O\211 \230\203.\311\f _\n_!\202[ \230\203>\311\f\n_!\202[ \230\203K\311\n!\202[ \230\203Z\311\n\312\245!\202[\310*\207" [inputstring etask-effort-num-regexp effort etask-effort-regexp etask-effort-units-regexp unit string-to-number string-match 0 etask-simplify-number 60.0 etask-effort-unit-week etask-workinghours-per-day etask-workingdays-per-week etask-effort-unit-day etask-effort-unit-hour etask-effort-unit-minute] 6 (#$ . 7622)]) #@89 Return a regexp string for searching for the task named TASKNAME. TASKNAME is a string. (defalias 'etask-get-elementregexp #[(taskname) "\301\301Q\207" [taskname "\""] 3 (#$ . 8310)]) #@124 Set ATTRIBUTE in TASK to VALUE. If attribute is invalid return nil. If optional value is nil the attribute is to toggle. (defalias 'etask-db-set #[(task attribute &optional value) " U\203\306\n\307 #\fC\244 T\n\233\244\207 U\203*\306\n\307 #\fC\244 T\n\233\244\207\fU\203A\306\n\307 #\fC\244 T\n\233\244\207U\203i\306\n\307#\310\n\"\230\203^\fC\202aC\244T\n\233\244\207U\203\200\306\n\307#\fC\244T\n\233\244\207U\203\227\306\n\307#\fC\244T\n\233\244\207U\203\316\310\n\"\211<\203\275G\311V\203\275\f@<\204\275\fD\306\n\307#\fC\244T\n\233\244)\207U\203\310\n\"\211<\203\364G\311V\203\364\f@<\204\364\fD\306\n\307#\fC\244T\n\233\244)\207U\203.\306\n\307#\310\n\"\230\203#C\202&C\244T\n\233\244\207 U\203E\306\n\307!#\fC\244!T\n\233\244\207\"U\203\\\306\n\307##\fC\244#T\n\233\244\207$U\203s\306\n\307%#\fC\244%T\n\233\244\207&U\203\212\306\n\307'#\fC\244'T\n\233\244\207(U\203\241\306\n\307)#\fC\244)T\n\233\244\207*U\203\270\306\n\307+#\fC\244+T\n\233\244\207\312\207" [attribute etask-db-attr-taskname task etask-db-ix-taskname value etask-db-attr-projname etask-get-sublist 1 etask-db-get 0 nil etask-db-ix-projname etask-db-attr-tracking etask-db-ix-tracking etask-db-attr-tasktype etask-db-ix-tasktype etask-normaltask-string etask-db-attr-peffort etask-db-ix-peffort etask-db-attr-eeffort etask-db-ix-eeffort etask-db-attr-taskbegin etask-db-attr-taskbegintime old etask-db-ix-taskbegin etask-db-attr-taskend etask-db-attr-taskendtime etask-db-ix-taskend etask-db-attr-mark etask-db-ix-mark etask-unmarkedtask-string etask-markedtask-string etask-db-attr-priority etask-db-ix-priority etask-db-attr-category etask-db-ix-category etask-db-attr-policy etask-db-ix-policy etask-db-attr-people etask-db-ix-people etask-db-attr-arglist etask-db-ix-arglist etask-db-attr-subtasklist etask-db-ix-subtasklist] 5 (#$ . 8502)]) #@61 Get ATTRIBUTE of TASK. If attribute is invalid return nil. (defalias 'etask-db-get #[(task attribute) " U\203\n\n 8\207\fU\203 8\207U\203  8\207 U\203,\n 8\207 U\2038\f 8\207 U\203D 8\207U\203a 8\211@<\203]@\202_)\207U\203z 8\211@<\205xA@)\207U\203\227 8\211@<\203\223@\202\225)\207U\203\260 8\211@<\205\256A@)\207U\203\274 8\207U\203\310 8\207U\203\324 8\207U\203\340 8\207U\203\354 8\207 U\203\370! 8\207\"U\203# 8\207\306\207" [attribute etask-db-attr-taskname etask-db-ix-taskname task etask-db-attr-projname etask-db-ix-projname nil etask-db-attr-tracking etask-db-ix-tracking etask-db-attr-tasktype etask-db-ix-tasktype etask-db-attr-peffort etask-db-ix-peffort etask-db-attr-eeffort etask-db-ix-eeffort etask-db-attr-taskbegin etask-db-ix-taskbegin datetime etask-db-attr-taskbegintime etask-db-attr-taskend etask-db-ix-taskend etask-db-attr-taskendtime etask-db-attr-mark etask-db-ix-mark etask-db-attr-priority etask-db-ix-priority etask-db-attr-category etask-db-ix-category etask-db-attr-policy etask-db-ix-policy etask-db-attr-people etask-db-ix-people etask-db-attr-arglist etask-db-ix-arglist etask-db-attr-subtasklist etask-db-ix-subtasklist] 3 (#$ . 10465)]) (byte-code "\301\302\303!\207" [etask-db-loaded-p t provide etask-db] 2)