-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
funcall-interactively: Wrong type argument: number-or-marker-p, nil #67
Comments
Can you please give a more precise reproducible? Which steps do you perform precisely? Which corfu settings? |
(unless (file-directory-p "/tmp/roam") (make-directory "/tmp/roam"))
(require 'use-package)
(use-package org-roam
:init
(setq org-roam-v2-ack t)
:custom
(org-roam-directory "/tmp/roam/")
(org-roam-completion-everywhere t)
:config
(org-roam-setup)
(org-roam-db-autosync-mode))
(require 'corfu) ;; autoload didn't work?
(use-package corfu
:custom
(corfu-auto t) ;; Enable auto completion
:init
(corfu-global-mode))
(use-package orderless
:init
(setq completion-styles '(orderless)
completion-category-defaults nil
completion-category-overrides '((file (styles . (partial-completion))))))
(use-package dabbrev
:init
(setq completion-cycle-threshold 1)
(setq tab-always-indent 'complete))
;; M-x org-roam-node-find foo-thing RET
;; M-x org-roam-node-find foo-two-thing RET
;; M-x org-roam-node-find bar-thing RET
;; now from within bar-thing you should be able to get corfu orderless completion
;; if you type "foo" you should (and do see):
;; foo
;; +-----------+
;; | foo-thing |
;; | bar-thing |
;; +-----------+
;; if you type "thi" you should see:
;; thi
;; +-----------+
;; | foo-thing |
;; | bar-thing |
;; +-----------+
;; thi
;; You don't... but... and this is the interesting part
;; You can get it to work *if* you create a file that has
;; the "thi" prefix and it will include the other desired results
;; M-x org-roam-node-find thi-thing RET
;; thi
;; +-----------+
;; | thi-thing |
;; | foo-thing |
;; | bar-thing |
;; +-----------+ I think this is related to not respecting joaotavora/eglot#725
joaotavora/eglot#733
|
I see. The issue is actually a bug in |
This worked for me, thanks so much for the quick help! ❤️ From my notes it seems that my wrong type argument error was from (defun completion--in-region (start end collection &optional predicate)
"Default function to use for `completion-in-region-function'.
Its arguments and return value are as specified for `completion-in-region'.
Also respects the obsolete wrapper hook `completion-in-region-functions'.
\(See `with-wrapper-hook' for details about wrapper hooks.)"
(subr--with-wrapper-hook-no-warnings
;; FIXME: Maybe we should use this hook to provide a "display
;; completions" operation as well.
completion-in-region-functions (start end collection predicate)
(let ((minibuffer-completion-table collection)
(minibuffer-completion-predicate predicate))
;; HACK: if the text we are completing is already in a field, we
;; want the completion field to take priority (e.g. Bug#6830).
(when completion-in-region-mode-predicate
(setq completion-in-region--data
`(,(if (markerp start) start (copy-marker start))
,(copy-marker end t) ,collection ,predicate))
(completion-in-region-mode 1))
(completion--in-region-1 start end)))) But with this fix it's never I'm not a hundred percent confident in this explanation, but it's the last thought I had on this topic. |
I thought this might be an issue witht he org-roam-complete-everywhere function, but I called it with evaluate expression and it returns expected results.
I instrumented and stepped through
corfu-complete
and I noticed that every time before the error in the title occurscompletion-in-region--data
is nil.I then did some more digging and figured out that it's only ever nil if I don't have any files whose prefixes begin with the input.
I'm using on NixOS and using:
The text was updated successfully, but these errors were encountered: