Skip to content
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

iESS entering extra lines and freezing #1226

Open
cddesja opened this issue Sep 30, 2022 · 6 comments
Open

iESS entering extra lines and freezing #1226

cddesja opened this issue Sep 30, 2022 · 6 comments

Comments

@cddesja
Copy link

cddesja commented Sep 30, 2022

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 want 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

@lionel-
Copy link
Member

lionel- commented Sep 30, 2022

Is this with the latest dev version?

@cddesja
Copy link
Author

cddesja commented Sep 30, 2022

@lionel- , this bug persists, but I think I know a little more about what might be the culprit. I originally reported this as a bug in corfu (#234), which itself was a duplicate of #229. The author of CORFU said it was a bug with the ESS Capf. CORFU works fine for me when I don't have auto-completion enabled (corfu-auto t). When I have that enabled this happens consistently and quickly.

@atanasj
Copy link

atanasj commented Oct 1, 2022

I think I'm actually experiencing the same error. I posted the referenced issue. The inferior buffer and R process seems to crash during completions in the ESS buffer when writing code.

@cddesja
Copy link
Author

cddesja commented Oct 1, 2022

@atanasj, if you want to use corfu with ESS/iESS, I have found it works fine with the following configuration (if you use use-package):

(use-package corfu
  ;; Optional customizations
   :custom
   (corfu-cycle t)                ;; Enable cycling for `corfu-next/previous'

  ;; Recommended: Enable Corfu globally.
  :init
  (global-corfu-mode))

;; A few more useful configurations...
(use-package emacs
  :init
  ;; TAB cycle if there are only few candidates
  (setq completion-cycle-threshold 3)

  ;; Emacs 28: Hide commands in M-x which do not apply to the current mode.
  ;; Corfu commands are hidden, since they are not supposed to be used via M-x.
  ;; (setq read-extended-command-predicate
  ;;       #'command-completion-default-include-p)

  ;; Enable indentation+completion using the TAB key.
  ;; `completion-at-point' is often bound to M-TAB.
  (setq tab-always-indent 'complete))

I have also not experienced this problem with company.

@atanasj
Copy link

atanasj commented Oct 1, 2022

Thanks @cddesja, I'll give that config a try and hopefully that sorts it out. I too had no issues when using company, with or without lsp-mode. However, corfu seems faster and works with every other language without issue, so if I can get a config with corfu working with ESS I'd rather do that than go back to company.

@atanasj
Copy link

atanasj commented Oct 5, 2022

@cddesja, that worked! Thanks! Hopefully the issue can be fixed here and this is just a temporary work around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants