Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad interaction with inferior-emacs-lisp-mode using company #21

Open
ackalker opened this issue Aug 13, 2015 · 2 comments
Open

Bad interaction with inferior-emacs-lisp-mode using company #21

ackalker opened this issue Aug 13, 2015 · 2 comments

Comments

@ackalker
Copy link

In my .emacs I have (company-global-mode t), set up my shell etc., and set up realine-complete for use with company using:

(add-to-list 'company-backends 'company-readline)
(add-hook 'rlc-no-readline-hook (lambda () (company-mode -1)))

The problem: when I do M-x ielm to start using inferior-emacs-lisp-mode, typing any char after a ( caues company to shut down instantly, without showing any completion candidates.

I have traced the problem to the ordering of my company backends, which happened to have readline-complete added last, causing it to be at the head of the list of backends which company tries for completions.
This ordering shouldn't make a difference, completion backends should check if they can perform completions at all. It appears that company-readline does not check whether there is actually a readline-enabled process running in the current buffer.

I would suggest doing something like what is done in the company-bbdb backend: create a (customizable) variable which lists in which modes readline-complete can do completions, and in the completion backend do a test whether the conditions for attempting completion are satisfied, i.e. return nil when completion using this backend is not possible.

@monsanto
Copy link
Owner

Thanks for the report. Would you be interested in submitting a PR? I'm not actively maintaining rlc anymore and I am trying to get more people familiar with the (small) codebase.

@martibosch
Copy link

I was using readline-complete in Ubuntu with company mode on emacs shells and it was working like a charm; but now I switched to Arch and company shuts down instantantly without showing any completion candidate.
I must note though that I had Emacs 25.1.2 in Ubuntu and now I have Emacs 25.1.1 in Arch.
Is it due to changes in emacs' shell.el? any clues of why is this happening?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants