Closed mclearc closed 2 years ago
It ist wrong to bind company-bibtex to a key. You have to define instead:
(defalias 'bibtex-capf (cape-interactive-capf (cape-company-to-capf 'company-bibtex)))
And bind that to a key.
@mclearc Did you consider porting company-bibtex
to the Capf API? This is generally the best way forward in particular for relatively simple backends like this bibtex backend, since it would help most users in the long term. Of course cape-company-to-capf
is always a viable stop gap measure, but from what I've seen it can be avoided in most cases with little effort.
There are a few sophisticated package like company-coq
or purescript-ide
which come with more complex Company backends. For such complex packages porting to Capf is more work. Furthermore it does not seem to be a good idea in those cases to creating competing packages or forks. For such packages it would be better to ask the authors to consider the move to the Emacs API.
Thanks so much -- that worked perfectly. Agreed that a port seems like a good idea here. If I can find the time I'll do so and put a link here. But thanks for the great stop-gap solution!
FYI: this should be helpful for those looking for a replacement for company-bibtex....
I'm trying to get company-bibtex working with
cape-company-to-capf
but so far have been unsuccessful (this is likely entirely my fault). Here's my config forcompany-bibtex
:This doesn't seem to work unless I call
company-mode
(and then it works via company and not corfu....). Any help is appreciated.