support custom minibuffer matching function#2177
Conversation
|
I tried to make this work today, but I don't understand how this could ever work - it seems to pass the I tried to make (setq read-file-name-completion-ignore-case t
read-buffer-completion-ignore-case t
completion-ignore-case t)I was able to get case-insensitive completion by wrapping ;;;###autoload
(defun russ/org-roam-find-file ()
""
(interactive)
(let ((completion-ignore-case t))
(org-roam-node-find
nil nil (lambda (node)
(= 0 (org-roam-node-level node))))))
;;;###autoload
(defun russ/org-roam-insert-file ()
""
(interactive)
(let ((completion-ignore-case t))
(org-roam-node-insert
(lambda (node)
(= 0 (org-roam-node-level node))))))Not sure if that applies to all completion frameworks though - it seems worth supporting a passed completion-predicate like this PR intended. |
Motivation for this change
Added support for custom
completion-readpredicate to theorg-rom-node-findfunction.The
org-roam-node-findfunction relies onorg-roam-node-read,which already provides the
require-matchargument to support thisbehavior.
This PR adds an optional argument to
org-roam-node-findwhich ispassed to the embedded
org-roam-node-readcall in order to supportcustom
completion-readpredicates when searching for nodes in theminibuffer.
Example Usage
Case-insensitive search in the minibuffer: