Closed madorian closed 3 months ago
@madorian Well, first things first, follow the template for filing an issue, so I can see how you are installing the package etc. But with the limited info I have from your post, it seems like there is something wrong with your consult (and or embark) installation. Do those work just fine (without consult-omni)?
Just as a sign of solidarity, and I dont have ghe time now to further investigate, I tried a quick look and it failed too. My config:
(use-package consult-omni
:straight (consult-omni :type git :host github :repo "armindarvish/consult-omni" :files (:defaults "sources/*.el"))
:after consult
:config
(require 'consult-omni-sources)
(require 'consult-omni-wikipedia)
)
I type something in and just get
apply: Args out of range: [], 0
Everything's up to date on emacs 29.4
GNU Emacs 29.4 Development version 6a299b3caceb on HEAD branch; build date 2024-07-19.
Maybe I'll try to look deeper later. But this was one of about three configs I tried from the git page and none worked, all giving the same error.
Backtrace:
Debugger entered--Lisp error: (args-out-of-range [] 0) (consult-omni--multi-lookup [] "#hello" nil "#hello" nil) (apply consult-omni--multi-lookup ([] "#hello" nil "#hello" nil)) (#f(compiled-function (&rest args2) #<bytecode -0xae282a1aa6a663f>) "#hello" nil "#hello" nil) (#f(compiled-function (narrow input cand) #<bytecode -0xcce2d72c3933eeb>) nil "#hello" "#hello") (consult--with-preview-1 (:predicate #
:keys nil) nil #f(compiled-function (narrow input cand) #<bytecode -0xcce2d72c3933eeb>) #f(compiled-function (&rest args2) #<bytecode -0x1aaa412383c063f>) consult-omni--search-history #f(compiled-function () #<bytecode 0x15c95cf9ee5307f3>)) (consult--read-1 #f(compiled-function (action) #<bytecode 0x14d233ef3569c5c1>) :prompt #("[consult-omni-multi] Search: " 1 19 (face consult-omni-prompt-face)) :sort t :require-match nil :history (:input consult-omni--search-history) :add-history ("#Desktop" "range") :initial "#" :sort nil :history (:input consult-omni--search-history) :initial "#" :category multi-category :predicate #f(compiled-function (&rest args2) #<bytecode -0xae282a1aa66a63f>) :annotate #f(compiled-function (&rest args2) #<bytecode -0xae282a1aa5be63f>) :group #f(compiled-function (&rest args2) #<bytecode -0xae282a1aa7f263f>) :lookup #f(compiled-function (&rest args2) #<bytecode -0xae282a1aa6a663f>) :preview-key (:predicate # :keys nil) :narrow nil :state nil :prompt "Select: " :preview-key any :sort t :lookup # ) (consult--read #f(compiled-function (action) #<bytecode 0x14d233ef3569c5c1>) :prompt #("[consult-omni-multi] Search: " 1 19 (face consult-omni-prompt-face)) :sort t :require-match nil :history (:input consult-omni--search-history) :add-history ("#Desktop" "range") :initial "#" :sort nil :history (:input consult-omni--search-history) :initial "#" :category multi-category :predicate #f(compiled-function (&rest args2) #<bytecode -0xae282a1aa66a63f>) :annotate #f(compiled-function (&rest args2) #<bytecode -0xae282a1aa5be63f>) :group #f(compiled-function (&rest args2) #<bytecode -0xae282a1aa7f263f>) :lookup #f(compiled-function (&rest args2) #<bytecode -0xae282a1aa6a663f>) :preview-key (:predicate # :keys nil) :narrow nil :state nil) (apply consult--read #f(compiled-function (action) #<bytecode 0x14d233ef3569c5c1>) (:prompt #("[consult-omni-multi] Search: " 1 19 (face consult-omni-prompt-face)) :sort t :require-match nil :history (:input consult-omni--search-history) :add-history ("#Desktop" "range") :initial "#" :sort nil :history (:input consult-omni--search-history) :initial "#" :category multi-category :predicate #f(compiled-function (&rest args2) #<bytecode -0xae282a1aa66a63f>) :annotate #f(compiled-function (&rest args2) #<bytecode -0xae282a1aa5be63f>) :group #f(compiled-function (&rest args2) #<bytecode -0xae282a1aa7f263f>) :lookup #f(compiled-function (&rest args2) #<bytecode -0xae282a1aa6a663f>) :preview-key (:predicate # :keys nil) :narrow nil :state nil)) (consult-omni--multi-dynamic nil nil :prompt #("[consult-omni-multi] Search: " 1 19 (face consult-omni-prompt-face)) :sort t :require-match nil :history (:input consult-omni--search-history) :add-history ("#Desktop" "range") :initial "#") (consult-omni-multi) (apply consult-omni-multi nil) (consult-omni) (funcall-interactively consult-omni) (command-execute consult-omni record) (execute-extended-command nil "consult-omni" nil) (funcall-interactively execute-extended-command nil "consult-omni" nil) (command-execute execute-extended-command)
This from an interactive, minibuffer call to "consult-omni".
This is a bit confusing! The original error was about showing (void-function static-if)
. Is that resolved now?
In the most recent example you posted above, why are you calling consult-omni
instead of consult-omni-wikipedia
?
Did you set your default interactive command to wikipedia? i.e.:
(setq consult-omni-default-interactive-command #'consult-omni-wikipedia)
Also, the config you posted above is not one of the "drop-in" examples, did you try any of those configs exactly as they are?
Closing this since there is no update!
I'm actually struggling with this as well. I get the same apply: Args out of range: [], 0
error and am not sure how to debug this any further. Advice?
@pmiddend Same questions as above. Tell me how you are installing the package and what's your setup and the questions I asked from the other user above. I cannot help without knowing what you are doing!
Okay, I get that, sorry for being presumptuous.
So to keep it light, I cloned the repository (I already have consult + embark installed) opened consult-omni.el
and simply did M-x eval-buffer
. I then did the same for sources/consult-omni-sources.el
, but that didn't get me any sources.
I then explicitly opened the wikipedia.el file and eval-buffered it. That gave me consult-omni-wikipedia
at least, but when I open that I get:
uncompressing publicsuffix.txt.gz...done
let: Invalid regexp: "Unmatched [ or [^" [2 times]
Error in post-command-hook (ido-cr+-schedule-dynamic-collection-update): (args-out-of-range #<buffer *Minibuf-1*> 34 41)
@pmiddend I cannot be sure, but it looks like you are using ido
and for some reason that is causing an issue with the minibuffer name. So first question is:
Do other consult commands work fine? (for example if you run consult-grep
what do you see?)
If consult works fine, then can you do this:
After running eval-buffer on those ".el" files you mentioned before:
M-x toggle-debug-on-error
(require 'consult-omni)
(require 'consult-omni-sources)
(require 'consult-omni-wikipedia)
(setq consult-omni-log-level 'debug)
M-x consult-omni-wikipedia
And if you get errors at any point in the process, put the backtrace (contents of *Backtrace*
buffer) here.
Just trying to get something working, but I assume this simple command should not output all of this?;)
, but I get