Closed zabe40 closed 2 years ago
Thank you for the detailed reporting of this issue.
I've created PR #580, which grabs the property from the first matching candidate in the unfiltered candidate list. This is the same candidate that would be selected automatically from typing, so this change should work the same as using selectrum-select-current-candidate
on the automatically selected library name.
Would you please check to see whether this change works for you? It works for me.
EDIT: Actually, things seem a bit more complicated when there are multiple versions of the same library. The PR seems to need more testing.
I just tested your PR, and can confirm that it works for cases with no load-path shadowing, but returns the wrong (shadowed) path when the library is shadowed.
I just tested your PR, and can confirm that it works for cases with no load-path shadowing, but returns the wrong (shadowed) path when the library is shadowed.
Thank you. I think that I found the cause of that error, and now just need to make sure that the Selectrum version accepts all of the variants that the built-in version accepts.
When calling
selectrum-submit-exact-input
orexit-minibuffer
fromselectrum-read-library-name
, it causesselectrum-read-library-name
to return nil regardless of the input. I initially noticed this when usingfind-library
as an Embark action.Heres a recipe for
emacs -Q
:While in the minibuffer after running the last form, if you call
selectrum-submit-exact-input
by pressingC-j
,selectrum-read-library-name
returns nil, even though selectrum is one of the given completions.After poking around a bit with edebug, it seems like the issue stems from the submitted input not having the
selectrum--lib-path
text property that is expected byselectrum-read-library-name
.