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

Polymode crashes Emacs 29 for Windows #40

Open
AntonioFasano opened this issue Feb 4, 2024 · 1 comment
Open

Polymode crashes Emacs 29 for Windows #40

AntonioFasano opened this issue Feb 4, 2024 · 1 comment

Comments

@AntonioFasano
Copy link

AntonioFasano commented Feb 4, 2024

Steps to reproduce in a freshly installed Windows 10 virtual machine hosted in Linux.

  1. Download Emacs 29.1_1 or 29.2_1, see links:
    http://ftpmirror.gnu.org/emacs/windows/emacs-29/emacs-29.1_1.zip
    http://ftpmirror.gnu.org/emacs/windows/emacs-29/emacs-29.2_1.zip

  2. Extract the zip and start Emacs with:
    runemacs.exe -Q

  3. Evaluate the following expressions:

 (require 'package)
 (add-to-list 'package-archives  '("stable-melpa" . "https://stable.melpa.org/packages/"))
 (list-packages)
  1. Install ess and poly-R packages from the stable MELPA archive.

  2. Evaluate the following expressions:

 (let ((default-directory user-emacs-directory))
   (normal-top-level-add-subdirs-to-load-path))
 (setopt inferior-R-program-name "path to your R/bin/x64/Rterm.exe")
 (require 'poly-R)
  1. Open a relatively large Rmd document.

  2. On an R code chunk, type C-return to start the inferior R buffer.

  3. Finally, navigate the document via the Polymode menu with Next/Previous chunk entries.
    Don't use key bindings, but the mouse and, in particular, use the same-type chunk entry in the menu.

May be after 10/15 chunk visits, like said above, Emacs crashes. Probably, the test works better if you do not disable the default Windows real-time virus & threat protection settings (active).

Specifically, for version 29.1_1, it just suddenly closes, so there are not many useful details.
For 29.2_1 it gets stuck. If you kill Rterm in Windows Task Manager, functionality seems to be restored, but only at keyboard level. Clicking with the mouse pointer is ineffective. I was unable to reproduce with ordinary R files in r-mode buffers, using the ESS menu eval entries, and similarly in Polymode using the key bindings, rather than the menu bar, I do not get errors.

As it seems, the bug is a mouse thing and is related to comint communication with the R process. The menu somehow queries R to navigate chunks and loses sync with the process, then it remains stuck waiting for an answer.

@mguzmann
Copy link

I am having the same issue in Linux.

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

2 participants