mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
(internal): revert completions from hash table to alist (#643)
Initially we thought that using hash-tables would shave some seconds because searching for a key is O(1), but when we present completions, we typically want them sorted, and hash-tables do not support sorted keys. Co-authored-by: Leo Vivier <leo.vivier+dev@gmail.com>
This commit is contained in:
@ -333,7 +333,7 @@ This uses the templates defined at `org-roam-capture-templates'."
|
||||
(let* ((completions (org-roam--get-title-path-completions))
|
||||
(title-with-keys (org-roam-completion--completing-read "File: "
|
||||
completions))
|
||||
(res (gethash title-with-keys completions))
|
||||
(res (cdr (assoc title-with-keys completions)))
|
||||
(title (plist-get res :title))
|
||||
(file-path (plist-get res :file-path)))
|
||||
(let ((org-roam-capture--info (list (cons 'title title)
|
||||
|
Reference in New Issue
Block a user