diff options
author | Case Duckworth | 2022-01-10 08:33:43 -0600 |
---|---|---|
committer | Case Duckworth | 2022-01-10 08:33:43 -0600 |
commit | 2918cb39a25558b8896bf212b68e22d1fde02032 (patch) | |
tree | e6eef338bddf327236d305ef0310fd793e9f8062 /lisp/+org-capture.el | |
parent | Add markdown (diff) | |
parent | Add a few packages and .. stuff (diff) | |
download | emacs-2918cb39a25558b8896bf212b68e22d1fde02032.tar.gz emacs-2918cb39a25558b8896bf212b68e22d1fde02032.zip |
Merge branch 'main' of https://tildegit.org/acdw/emacs
Diffstat (limited to 'lisp/+org-capture.el')
-rw-r--r-- | lisp/+org-capture.el | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lisp/+org-capture.el b/lisp/+org-capture.el index ba036bd..6c59b98 100644 --- a/lisp/+org-capture.el +++ b/lisp/+org-capture.el | |||
@@ -85,5 +85,21 @@ properly process the variable." | |||
85 | ;; Sort after, maybe | 85 | ;; Sort after, maybe |
86 | (when sort-after (+org-capture-sort list)))) | 86 | (when sort-after (+org-capture-sort list)))) |
87 | 87 | ||
88 | (defun +org-template--ensure-path (keys &optional list) | ||
89 | "Ensure path of keys exists in `org-capture-templates'." | ||
90 | (unless list (setq list 'org-capture-templates)) | ||
91 | (when (> (length key) 1) | ||
92 | ;; Check for existence of groups. | ||
93 | (let ((expected (cl-loop for i from 1 to (1- (length key)) | ||
94 | collect (substring key 0 i) into keys | ||
95 | finally return keys))) | ||
96 | (cl-loop for ek in expected | ||
97 | if (not (+org-capture--get ek (symbol-value list))) do | ||
98 | (setf (+org-capture--get ek (symbol-value list)) | ||
99 | (list (format "(Group %s)" ek))))))) | ||
100 | |||
101 | (defun +org-define-capture-template (keys title &rest args) | ||
102 | ) | ||
103 | |||
88 | (provide '+org-capture) | 104 | (provide '+org-capture) |
89 | ;;; +org-capture.el ends here | 105 | ;;; +org-capture.el ends here |