aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2023-11-13 10:58:20 +1100
committerYuchen Pei <id@ypei.org>2023-11-13 10:58:20 +1100
commit9c6e41fb12fb0fb355bb48696424c8d8973077c3 (patch)
treef35ccd9f5fc161781f0ab361a299768799979848 /emacs/.emacs.d/lisp
parentca76547b69f2b9fb13e757229235e702836e3a2b (diff)
[emacs] Use ~ as task id separator for better completion with partial-completion
Diffstat (limited to 'emacs/.emacs.d/lisp')
-rw-r--r--emacs/.emacs.d/lisp/my/my-org.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-org.el b/emacs/.emacs.d/lisp/my/my-org.el
index 1f5ca63..b189b78 100644
--- a/emacs/.emacs.d/lisp/my/my-org.el
+++ b/emacs/.emacs.d/lisp/my/my-org.el
@@ -1493,7 +1493,10 @@ Return the next id before incrementing."
(lambda (cat) (format "%s" cat))
my-org-task-categories)))))
(my-org-task-remove-id)
- (let* ((id (format "%s-%d" category (my-org-task-increment-id category)))
+ (let* ((id (format "%s%s%d"
+ category
+ my-org-task-id-separator
+ (my-org-task-increment-id category)))
(headline (org-entry-get (point) "ITEM"))
(new-headline (format "%s %s" id headline)))
(org-entry-put (point) my-org-task-property-name id)
@@ -1514,6 +1517,11 @@ Better be symmetric, i.e. if (A . B) is an element, so should (B
:group 'my-org
:type '(repeat (cons string string)))
+(defcustom my-org-task-id-separator "~"
+ "Separator in task id, separating task category from number."
+ :group 'my-org
+ :type 'string)
+
(defcustom my-org-properties-separator ", "
"Separator in a property value field."
:group 'my-org