Giter Site home page Giter Site logo

orderless & company-capf about orderless HOT 15 CLOSED

oantolin avatar oantolin commented on August 19, 2024
orderless & company-capf

from orderless.

Comments (15)

oantolin avatar oantolin commented on August 19, 2024 1

I can't reproduce this bug, @terlar. I installed company, turned on company-mode, set company-show-numbers to t, and tried using company in the *scratch* buffer. It worked fine, the completion did delete my initial input. Then I tried turning off my orderless config and using yours, and it still worked fine. Then I tried from emacs -q, loading only company and orderless, and it still worked.

I'd love to help you out, but it's practically impossible without knowing how to trigger the error. I suggest you use the fantastic bug-hunter with the interactive option to figure out what part of your init file is relevant to this bug.

from orderless.

oantolin avatar oantolin commented on August 19, 2024 1

OK, now I insist you file a bug report with company. 😄

I could reproduce the problem without orderless:

(setq company-backends '((company-capf company-dabbrev)))
(setq completion-styles '(partial-completion))

The built-in partial-completion style matches, for example, u-p to use-package and this happens with company-dabbrev on the list:

image

from orderless.

terlar avatar terlar commented on August 19, 2024 1

Thank you, did I steal this issue? The title applies, but I guess this was a different problem than @tpeacock19 had. So not sure if it should be closed.

from orderless.

tpeacock19 avatar tpeacock19 commented on August 19, 2024 1

No problem, This was a bit ago but I remember identifying that this only occurred in emacs-lisp-mode and subsequently removing company-capf from the backends when working in elisp. Further, I cant replicate it today even if I reintroduce company-capf so I think its fine to close this out.

from orderless.

terlar avatar terlar commented on August 19, 2024

I didn't manage to get completions work with company, all the candidates, includes whatever I wrote + the garbled matches.
Screenshot from 2021-01-04 18-01-47

Accepting candidate 9, results in (usepkguse-package)

Using the following config:

(setq orderless-matching-styles '(orderless-regexp orderless-flex))

from orderless.

oantolin avatar oantolin commented on August 19, 2024

I don't use company myself, but I'll try to install it when I get the chance and see if I can figure this out. I remember testing it a while ago when I wrote the section of the Readme on company, and I think it did work back then.

from orderless.

oantolin avatar oantolin commented on August 19, 2024

Well, the resolution of bug-hunter is an s-expression I believe. So if you use use-package you'll probably have to bisect your company config by hand.

from orderless.

terlar avatar terlar commented on August 19, 2024

Indeed! Running with emacs -Q this didn't occur. Really curious what part is causing this, because I don't configure company much. So must be some interference of some other package/settings...

So I did some further investigation and lo and behold and it turns out it was my company config. Here is a minimal reproduction via emacs -Q:

(require 'orderless)
(require 'company)
(setq completion-styles '(orderless))
(setq orderless-matching-styles '(orderless-regexp orderless-flex))
(require 'use-package)
(setq company-backends
        '((company-files
           company-keywords
           company-capf
           company-dabbrev-code
           company-dabbrev)))
(emacs-lisp-mode)
(company-mode 1)

Enter usepkg

Then it should look like this:
Screenshot from 2021-01-12 23-09-32

I guess the issue might be with grouped backends?

from orderless.

oantolin avatar oantolin commented on August 19, 2024

Oh, that's weird. And it's starting to sound like a company bug, not an orderless bug.

from orderless.

terlar avatar terlar commented on August 19, 2024

It seems to only when company-dabbrev is on the list, if I remove that it works. Indeed, but without orderless this behavior doesn't occur. I have also tried the company-fuzzy (which also fuzzy matches) library and that also works without issues.

So unless I can find a way to reproduce this without orderless, I am not entirely convinced, although it seems like it, but I also have no insight into the implementation of orderless if this could even be possible.

from orderless.

terlar avatar terlar commented on August 19, 2024

Even smaller repro:

(setq company-backends '((company-capf company-dabbrev)))

from orderless.

terlar avatar terlar commented on August 19, 2024

If you insist I will open an issue with company instead.

from orderless.

oantolin avatar oantolin commented on August 19, 2024

I'm not insisting yet. Let me try (setq company-backends '((company-capf company-dabbrev))) and see if I can figure it out.

from orderless.

oantolin avatar oantolin commented on August 19, 2024

That's right! Sorry, @tpeacock19.

from orderless.

oantolin avatar oantolin commented on August 19, 2024

I'm glad it seems to longer happen.

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.