minad / corfu

:desert_island: corfu.el - COmpletion in Region FUnction
GNU General Public License v3.0
1.06k stars 42 forks source link

corfu seems to be entering newlines into iESS #234

Closed cddesja closed 1 year ago

cddesja commented 1 year ago

Originally, I thought this problem was associated with the ESS package, but I think it's the corfu package.

I am encountering two issues that I managed to capture in the GIF below.

  1. iESS enters a newline or hits "Enter". You can see this early in the GIF if you watch the little blue arrow on the left move from the 2nd to the last row to the 3rd to the last row.
  2. Occasionally running commands, like head(data_name) makes iESS non-responsive. Hitting C-c C-c does nothing and I have to close Emacs.

Not sure how to troubleshoot these issues or provide more information, but I'm happy to if someone can help me. This happens pretty frequently every 5 minutes or so, making ESS/iESS unusable for long.

Screen Recording 2022-09-29 at 4 16 13 PM

minad commented 1 year ago

As far as I know the ESS Capf doesn't work properly with Corfu, since it doesn't handle interrupts well. See #229 and my responses there. You also see "process is not ready" messages in your GIF, caused by this issue.

Unfortunately I cannot offer you more assistance with backend issues like this one at this time. While most backends work well, there are a handful backends which are semi-broken. Debugging all these backends exceeds the time I can spent on Emacs hacking. Anyway, the right place to open backend issues is at the repository they belong to (in this case ESS).

minad commented 1 year ago

I should add - my recommendations for now are:

  1. Try Cape sanitizers in order to fix the broken Capf (cape-wrap-noninterruptible, cape-wrap-purify). Of course these are only a stop gap measures.
  2. Try cape-company-to-capf and use the Company backend with Corfu if the native Capf backend doesn't work.
  3. Disable Corfu in ESS buffers
cddesja commented 1 year ago

Thanks for the help. Corfu is usable with having (corfu-auto t) commented out and just using (corfu-cycle t), for example.

Issue opened on ESS's GitHub

minad commented 1 year ago

Good point, turning off corfu-auto or using a large auto delay is certainly helpful since auto completion is demanding for backends (regarding both correctness and performance).