emacs-ess / ESS

Emacs Speaks Statistics: ESS
https://ess.r-project.org/
GNU General Public License v3.0
623 stars 162 forks source link

C-c C-c doesn not interrupt the process in Emacs 29-3 while using ESS #1297

Open parvizfarnia opened 4 months ago

parvizfarnia commented 4 months ago

Hello everyone,

My environment:

Emacs version : 29.3
OS: Windows 11 (64 bits)
ESS version downloaded from MELPA: ess-20240516.811
R version: 4.4.1

According to the online documentation: https://ess.r-project.org/Manual/ess.html#Other

4.8 Other commands provided by inferior-ESS The following commands are also available in the process buffer:

Command: comint-interrupt-subjob

C-c C-c Sends a Control-C signal to the iESS process. This has the effect of aborting the current command. 

However, no matter how many times the user enters C-C C-c the current running job/process in R terminal within ESS is not interrupted. It is easy to reproduce:

1) Launche a R session via M-R 2) Then run Sys.sleep(10) 3) And right after that try to interrupt before the 10 seconds of Sys.sleep via C-c C-c and you will see that it is not possible.

Am I missing something with this new version of Emacs or is it a bug?

Thanks in advance.

jacobkasper commented 4 months ago

This is a different problem than I reported. I can cancel the Sys.sleep command with C-c C-c

parvizfarnia commented 4 months ago

How do you proceed? You just put the cursor in iESS buffer and then you do C-c C-c ? Because when I do so, I just see C-c C-c being printed in iESS without any effect (= interruption)

To be sure, I checked on several different machines, and each time there is the same problem.

Yousuf28 commented 3 months ago

C-c C-c then Enter works for me.
If i hit C-c C-c, it get printed on console but nothing happen. If I hit enter after that it gets interrupted. I am using doomemacs on windows. Emacs version 29-3

idhx commented 2 months ago

I'm experiencing a similar issue. C-c C-c followed by enter does not work for me.

I use corfu for autocompletion and suspect this might be a duplicate of #1226 (see also #1267). I'm applying the temporary workaround suggested in those issue (disabling auto-completion by setting corfu-auto to nil) and will report on whether I still experience this problem. Clearly disabling auto-complete is not ideal, but it would at least be good to confirm whether this is the origin of the bug.

idhx commented 2 months ago

This is a quick follow up to confirm that, in my case, setting corfu-auto to nil resolves the issue. Could others (esp @jacobkasper since they could not use C-c C-c Enter, like me) confirm whether the same applies for them? If so, this and #1296 might be duplicates of #1226.

Note: A possibly better stopgap than disabling autocompletion with corfu would be to use cape wrappers as suggested by the author of corfu here. I don't have time to try this now, but will report again if I do.