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
Put <return>
as company-auto-complete-chars
#530
Comments
This seems like the best available option for that. |
Hi, can you help me how to do it with a function. I try to add as a character to |
Something like this (defun my-return-p (input)
(eq ?\n (string-to-char input)))
(setq company-auto-complete-chars #'my-return-p) But it seems to have a fatal problem: it inserts a newline afterwards. Which is expected for |
you are so cool, it works. |
OK, if that's what you wanted. |
Is there a simple way to get RET/ to complete only on explicit-action-p but without inserting a newline? |
@unhammer You can define a new command and bind it. |
EDIT: update to a better version below.
|
@magicdirac Good example. Notes:
|
The first one I tried to look up |
Those are different keys. The global map likely has only a binding for |
If RET is bound by a minor mode, maybe
is more general. Ideally, one could go from |
I think so.
Have you tried |
|
We've had the So OK, let's try removing it. Too bad we can't do so with |
Autopair doesn't bind it anymore. Org doesn't seem to either.
@dgutov Please revert this change, it breaks documented and expected behaviour (http://company-mode.github.io/ Usage). |
Do you know why that happens? |
@dgutov Ah sorry for not being clear: when I hit in Geiser, in SLIME, in IELM, Yeah, I know, this whole |
Could you please report this issue to Geiser and SLIME, and ask them not to bind Unless they have convincing reasons to do this, I'd rather keep this change. |
@dgutov I'm afraid that's going to be tough (especially in the case of SLIME, which will have to consider breakage of expected behaviour of lots of heavily invested users), as I'm just another user. Why not hold off on the change until the other packages have dropped their 'double' bindings? Or are you trying to force their hand? |
When do you estimate that might happen? And what would cause them to?
I suppose I am, now that you brought the problem to my attention. Anyway, could you please report the issues, and we'll see how it goes from here, depending on the responses. |
I'm sorry, but I think you're fighting an uphill struggle here, it takes only a single (minor) mode out of the dozens out there to bind |
That's not the way to convince me.
Any user can re-add the binding in their own init script even without such a variable. |
Actually, maybe I can avoid having this argument by applying the syntax table via an overlay, and fixing an old issue along with it. Please stand by. |
It doesn't seem to help with the problem in question, sorry. On the brighter side, So the hill can't be too high. |
I've reverted that change because of (EDIT) #543, sorry @magicdirac. Going against Org this way would indeed be difficult. |
@dgutov cool, brother. I will then keep |
How to put
<return>
as one of thecompany-auto-complete-chars
?so that I can unbind from
company-active-map
The benefit is that I will get normal
<return>
functionality when I press<return>
, unless I have interacted with company explicitly, then it will insert the choice I chose with this settingThe text was updated successfully, but these errors were encountered: