Giter Site home page Giter Site logo

Comments (10)

protesilaos avatar protesilaos commented on August 19, 2024

Of notice is also the fact that Icomplete no longer highlights the matching characters (beside the matching candidate), but we can check that later.

from orderless.

oantolin avatar oantolin commented on August 19, 2024

I thought the completion-boundaries function had my back for this initial input business. I guess not, or rather, not in all cases, because it certainly fixed issue #1.

from orderless.

oantolin avatar oantolin commented on August 19, 2024

Of notice is also the fact that Icomplete no longer highlights the matching characters (beside the matching candidate), but we can check that later.

Yes, that's issue #4, kindly submitted by @jixiuf.

from orderless.

oantolin avatar oantolin commented on August 19, 2024

When completing-read is given an initial input, such as one that represents a directory path, out-of-order matching will yield no results, unless the user's input starts with a space.

I don't think this is actually true. What I think is going on in your image is that /home/prot/the is being taken as a single regexp and it doesn't match any candidate. If, instead of the mo, you had typed G the mo, for example, it would use regexps /home/prot/G, the and mo, and some candidates do match all three. That would happen even though you started with G and not with a space.

So, I think it's working as advertised, so maybe this isn't technically a bug. It can be inconvenient, though, and we can try to fix it. Let me think about it a bit.

from orderless.

oantolin avatar oantolin commented on August 19, 2024

Maybe a good solution is to have the regexp separator configurable. For completing paths you'd want to split the pattern on whitespace and slashes.

from orderless.

oantolin avatar oantolin commented on August 19, 2024

i just realized the separators are already configurable. :) You can wrap your completing-read call in:

(let ((split-string-default-separators "[/ ]"))
   ...)

to have both slashes and spaces separate the regexps.

from orderless.

protesilaos avatar protesilaos commented on August 19, 2024

You are right, this is not a faulty behaviour per se. Just a matter of easing the user experience.

With regard to split-string-default-separators, it does indeed work. Could this be exposed as a user-facing option for when orderless is being used?

from orderless.

oantolin avatar oantolin commented on August 19, 2024

I was first inclined to just document the usage split-string-default-separators, but I decided to add a variable orderless-regexp-separator, mostly because I think people might want to change its value for their entire Emacs session, and it seems like a terrible idea to fiddle with split-string-default-separators (as it affects every call to split-string which does not specify a separator).

Does adding that option adequately address this issue?

from orderless.

protesilaos avatar protesilaos commented on August 19, 2024

Yes, I can confirm this works!

from orderless.

oantolin avatar oantolin commented on August 19, 2024

Excellent, I'll close this issue then.

from orderless.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.