-
Notifications
You must be signed in to change notification settings - Fork 162
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
C-c C-c doesn not interrupt the process in Emacs 29-3 while using ESS #1297
Comments
This is a different problem than I reported. I can cancel the Sys.sleep command with C-c C-c |
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. |
C-c C-c then Enter works for me. |
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 |
This is a quick follow up to confirm that, in my case, setting 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. |
Hi! Another user here having the same issue. The author of corfu/cape suggested doing this:
Is there someone having a piece of config to work around the issue? This bug is a kind of annoying and I would like to see how others have handled it. Thanks for your help. Best. |
I've been using the following.:
|
Thank you so much @idhx. Maybe these lines should be upstream for now, until there is a definitive fix. Best. |
Glad this helped. Incidentally, coming back to this thread made me want to try the second option:
I wanted to try this because I was encountering very slow completion whenever I used a I've only just added the following lines to my config, but they seems to be working well so far. It's really nice to be able to get completions from ESS's company backends in corfu. The only annoyance is that corfu-popup-info mode does appear to play well with the company-R-objects backend, so I've disabled that for now. ;; required for ess company backends
(use-package company
:demand t)
;; Use ESS's company backends (with cape) to avoid hanging on print(). See
;; https://github.com/emacs-ess/ESS/issues/1247
(add-hook 'ess-mode-hook
(lambda ()
(progn
(setq-local completion-at-point-functions
(mapcar #'cape-company-to-capf
(list #'company-R-args #'company-R-objects #'company-R-library)))
;; nice but breaks with completion of r objects
(corfu-popupinfo-mode -1)))) |
I get the same behavior ( Edit after a day: Many R sessions with |
I can reliably reproduce the behavior using the (Incidentally, This reproduces reliably on both macos (sequoia 15.2, R-4.3.3, ess-version: [elpa: 20241127.1620]) and linux (ubuntu 24.04, R-4.3.2, ess-version: [elpa: 20240821.1952]). I'm asking others to consider what is happening under the hood in that could contribute to the not-interruptibility. This does NOT hang (so it's not just while (TRUE) { Sys.sleep(1); message(format(Sys.time())); }
# 2025-02-11 09:18:17
# 2025-02-11 09:18:18
# 2025-02-11 09:18:19
# C-c C-c
httpgd::hgd()
# httpgd server running at:
# http://127.0.0.1:60946/live?token=6qZHAhGb
dev.list()
# unigd
# 2
while (TRUE) { Sys.sleep(1); message(format(Sys.time())); }
# 2025-02-11 09:18:23
# 2025-02-11 09:18:24
# C-c C-c
41+1
# [1] 42 Demoing with a very simple plumber interface, using a single endpoint: #* @get /test
function(req, res, ...) { Sys.sleep(1); pi; } Using that plumber::plumb("plumber.R")$run(port=9999)
# Running plumber API at http://127.0.0.1:9999
# Running swagger Docs at http://127.0.0.1:9999/__docs__/
# C-c C-c
41+1
# [1] 42 Same Sys.getpid()
# [1] 38659
httpgd::hgd()
# httpgd server running at:
# http://127.0.0.1:60978/live?token=f5a6qLEH
dev.list()
# unigd
# 2
plumber::plumb("plumber.R")$run(port=9999)
# Running plumber API at http://127.0.0.1:9999
# Running swagger Docs at http://127.0.0.1:9999/__docs__/
# C-c C-c
# C-c C-c
# C-c C-c
### `kill -HUP 38659`
# Process R:1 hangup: 1 at Tue Feb 11 09:21:24 2025 I don't have to actually call the As for signals to interrupt/kill the R process: I used Sys.getpid()
# [1] 39524
httpgd::hgd()
plumber::plumb("plumber.R")$run(port=9999)
# httpgd server running at:
# http://127.0.0.1:61644/live?token=r9gDWJsv
# Running plumber API at http://127.0.0.1:9999
# Running swagger Docs at http://127.0.0.1:9999/__docs__/
# C-c C-c
# C-c C-c
### `kill -PIPE 39524`
# Error in execCallbacks(timeoutSecs, all, loop$id) :
# ignoring SIGPIPE signal
41+2
# [1] 43
plumber::plumb("plumber.R")$run(port=9999)
# Running plumber API at http://127.0.0.1:9999
# Running swagger Docs at http://127.0.0.1:9999/__docs__/
# C-c C-c
# C-c C-c
### `kill -PIPE 39524` ...
# C-c C-c
# C-c C-c
### `kill -HUP 39524`
# Process R:1 hangup: 1 at Tue Feb 11 10:01:20 2025 My guess is that the I've not seen any of the ESS devs chime in yet on this. Is there anything you've seen in the interaction with |
Hello everyone,
My environment:
According to the online documentation:
https://ess.r-project.org/Manual/ess.html#Other
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:M-R
Sys.sleep(10)
Sys.sleep
viaC-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.
The text was updated successfully, but these errors were encountered: