orderless and directories
ecraven opened this issue · comments
Hello!
When doing completion deeply into directories (like ~/a/b/gam
to expand to ~/alpha/beta/gamma
), orderless doesn't do this, so emacs falls back to the other completion methods (partial-completion
can complete this). However, partial-completion
only completes gam
at the beginning of files, so digamma
would not be matched... is there any way to make orderless understand deep directory completion and use it in this way?
Thanks for any help, greetings!
No, this out of scope for orderless, which will only deal with strings and will not probe the file system.
On the other hand, I do believe partial-completion understands wildcards, so the problem of gam
only matching at the beginning can be solved by writing *gam
instead.
thank you for the answer!
@oantolin I agree that this is out of scope of Orderless. But as far as I understand, partial-completion
doesn't really probe the file system. It doesn't actually break the abstraction. Instead it calls the completion table repeatedly with substrings of the input and recurses.
The completion style machinery could do a bit better at composability. It would be great to have the ability to glue together different filtering features. For example in this case one would like to take the "partial completion recursion" feature and glue it together with the Orderless way of filtering candidates. In the other issue #141, I had explored a potential limiter feature, which would ideally compose with other completion style features (it doesn't work because of sorting by recency, just mentioning it as illustration).
But as far as I understand,
partial-completion
doesn't really probe the file system. It doesn't actually break the abstraction. Instead it calls the completion table repeatedly with substrings of the input and recurses.
Oh, that's right, @minad. I forgot how that worked. Thanks for the correction.