diff options
author | Yuchen Pei <id@ypei.org> | 2023-11-05 21:13:47 +1100 |
---|---|---|
committer | Yuchen Pei <id@ypei.org> | 2023-11-05 21:13:47 +1100 |
commit | 91894c16a1064c3a0ea780b85134c0e30af2b946 (patch) | |
tree | 3ea31ccdd39b0b8ec6df796da0115f6ca6267d1c /emacs/.emacs.d/lisp/my | |
parent | 750a37679318263d8a313e2fb062c13ec23504ae (diff) |
[emacs] Some further fixes to my-org-task.
- Read categories from local
- Add more documentation
- Change my-org-task-relations to defcustom
Diffstat (limited to 'emacs/.emacs.d/lisp/my')
-rw-r--r-- | emacs/.emacs.d/lisp/my/my-org.el | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-org.el b/emacs/.emacs.d/lisp/my/my-org.el index 7aabf9a..9900195 100644 --- a/emacs/.emacs.d/lisp/my/my-org.el +++ b/emacs/.emacs.d/lisp/my/my-org.el @@ -1422,7 +1422,11 @@ or filename if no title." ;;; task management (defcustom my-org-task-categories nil - "Task categories for org custom_id creation." + "Task categories for org task id creation. + +Task ID will be in the format of <category>-<counter>. For +example, if `my-org-task-categories' is '(WORK CHORE), task ids +will be in the format of WORK-42 CHORE-1024 etc." :group 'my-org :type '(repeat symbol)) @@ -1437,7 +1441,7 @@ or filename if no title." :type 'string) (defun my-org-task-init () - "Initialise next ids and write them to `my-org-task-next-id-file'." + "Initialise next ids to be 0 and write them to `my-org-task-next-id-file'." (my-org-task-write-next-ids (mapcar (lambda (cat) @@ -1495,7 +1499,7 @@ Return the next id before incrementing." (org-entry-put (point) my-org-task-property-name id) (org-edit-headline new-headline))) -(defvar my-org-task-relations +(defcustom my-org-task-relations '(("BLOCKS" . "BLOCKED_BY") ("CAUSES" . "CAUSED_BY") ("DUPLICATES" . "DUPLICATED_BY") @@ -1503,7 +1507,12 @@ Return the next id before incrementing." ("BLOCKED_BY" . "BLOCKS") ("CAUSED_BY" . "CAUSES") ("DUPLICATED_BY" . "DUPLICATES")) - "Task relations and their dual relations.") + "Task relations and their dual relations. + +Better be symmetric, i.e. if (A . B) is an element, so should (B +. A)." + :group 'my-org + :type '(repeat (cons string string))) (defcustom my-org-properties-separator ", " "Separator in a property value field." |