fix(org-roam-node-read): fix regression introduced in #1876 (#1882)

Fix `filter-fn` not working like its supposed to.
This commit is contained in:
Jethro Kuan
2021-10-01 15:09:10 +08:00
committed by GitHub
parent 0ecbd3a104
commit 1b8ece0219

View File

@ -443,7 +443,8 @@ If REQUIRE-MATCH, the minibuffer prompt will require a match."
(let* ((nodes (org-roam-node-read--completions))
(nodes (if filter-fn
(cl-remove-if-not
(lambda (n) (funcall filter-fn (cdr n)) t))
(lambda (n) (funcall filter-fn (cdr n)))
nodes)
nodes))
(sort-fn (or sort-fn
(when org-roam-node-default-sort