From 91894c16a1064c3a0ea780b85134c0e30af2b946 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Sun, 5 Nov 2023 21:13:47 +1100 Subject: [emacs] Some further fixes to my-org-task. - Read categories from local - Add more documentation - Change my-org-task-relations to defcustom --- emacs/.emacs.d/lisp/my/my-org.el | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'emacs/.emacs.d/lisp') 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 -. 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." -- cgit v1.2.3