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
Quitting a completing-read
performed in the middle of a completion will break Company
#1408
Comments
completing-read
performed in the middle of of completion will break Companycompleting-read
performed in the middle of a completion will break Company
Sounds like this will need a |
Maybe, if you provide a patch or branch I'll happily try it out
What does that mean? |
Could this happen in the
This might suffice: diff --git a/company.el b/company.el
index a650cbc..5d732e2 100644
--- a/company.el
+++ b/company.el
@@ -2232,7 +2232,8 @@ For more details see `company-insertion-on-trigger' and
(when company-auto-update-doc
(condition-case nil
(company-show-doc-buffer)
- (user-error nil))))
+ (user-error nil)
+ (quit nil))))
(let ((delay (company--idle-delay)))
(and (numberp delay)
(not defining-kbd-macro) |
Thanks much for the prompt response! I can confirm that the patch fixes it - after applying it, I can proceed after
Not that I could see. |
Thanks for testing, I can apply and push it now. Something else to consider: do you want these prompts? CIDER could consult some variable (e.g. |
Cheers. I'm pretty confident that we want these prompts. These Java docstrings can be wildly long and different across classes, so a guess can misinform the user, and a concatenation wouldn't be quite readable. I appreciate the concern though. I created clojure-emacs/cider#3501 for making the experience more streamlined (only for the particular Company + IDO combination though) - feel free to check it out. |
Makes sense. But in the linked issue you're referring to the same problem (flooring What I'm suggesting is for Anyway, I'll follow the other discussion, let's see what you settle on. |
CIDER can perform a
(completing-read)
while a Company popup is being shown. That is accomplished here:https://github.com/clojure-emacs/cider/blob/5edfbc0bedef4c751f2e753477eb3ca4986bf0f0/cider-client.el#L484
Here's a sample of it working:
What it accomplishes is to disambiguate the candidate, as it may come from different Java classes. This way, Company will show the right documentation.
This techique works, except if the user aborts with
C-g
. In that case, completion will no longer work until the buffer is closed and opened again.I will see in
*messages*
:Error in post-command-hook (company-post-command): (quit)
It's as if some internal state wasn't cleaned up afterwards?
Thanks - V
The text was updated successfully, but these errors were encountered: