-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Using racket-mode to edit source in org-mode document causing 100% cpu #348
Comments
Thank you for the report. This might be some kind of variation of #344 which also involves company-mode. Although I think company-mode is wonderful for auto-completion, I prefer pressing TAB to complete manually, so I'm afraid it doesn't get "dog-fooded" by me. An ideal fix would also include updating |
I noticed when testing on Windows, that sometimes the connection would not succeed, and furthermore get stuck in a state where racket--cmd-connecting-p was left non-nil. This commit fixed that for me. Although this might have some bearing on issue #344 and issue #348, I don't have any reason to think this fixes those.
I noticed when testing on Windows, that sometimes the connection would not succeed, and furthermore get stuck in a state where racket--cmd-connecting-p was left non-nil. This commit fixed that for me. Although this might have some bearing on issue #344 and issue #348, I don't have any reason to think this fixes those.
I can't seem to reproduce this. When I type racket-mode needn't start a racket process and the REPL, to get completion candidates. Ever since commit b0296d9 in July 2018, if the REPL isn't running, it doesn't try to start it. Instead it simply uses for completion candidates the same default list used for font-lock. The idea was to avoid exactly this kind of problem trying to start Racket while you're typing. Your details suggest you have quite recent racket-mode, including this commit:
So I am super confused why you're seeing this. 🙁 |
I'm not sure why the REPL would get started but I it seems likely that is where the issue lies. Type ( emacs hangs - 1 core is 100% CPU in process monitor CTRL-g - emacs returns to normal Here's what appears in the *Messages* buffer during this experiment::
Seems like a tight loop checking for the racket command to appear is causing the CPU spike. CTRL-g ends that for some reason - racket command process appears and things come back to normal. I'm not sure how or why company-mode is related but if I disable company-mode there is no hang. Re-enabling indeed cusses the hang to return. My company version is company-20190109.2336 (again from melpa). I wonder if it's related to emacs 26.1's new threading behaviour? EDIT: Further: it doesn't appear to be the company-mode/racket-mode combination - that works well for me - it seems to be org-mode/company-mode/racket-mode. |
After tinkering around, trying to track down the cause issue I've edited several files in racket-mode, org-mode and company-mode. The README does say it might be necessary to delete and re-install racket-mode for updates and I think that has fixed my problem. I really should have done that first, so sorry to have wasted your time. |
I noticed when testing on Windows, that sometimes the connection would not succeed, and furthermore get stuck in a state where racket--cmd-connecting-p was left non-nil. This commit fixed that for me. Although this might have some bearing on issue #344 and issue #348, I don't have any reason to think this fixes those. ----------------------------------------------------------------- PROVENANCE: Today I noticed commit 98bb9c7 and commit cedf4ba linked to from the above issues. But I do not have either commit in any of my local repos, not even according to `git fsck --lost-found`. WAT. I suspect what happened was that I made a topic branch and pushed a commit, which is why GitHub got it (and apparently will keep it indefinitely because of the link from comments). But then I deleted the branch without merging. Or possibly that commit was rebased away before merging the branch. Probably this happened on a new Windows laptop. In my defense, mid-January I was moving between Mac and Windows, as part of an effort to improve racket-mode support on the latter. And then, a Linux laptop got added to the mix, as well. In any case I'm going to recover and use this commit, now. The bit above the horizontal line is the commit message.
I noticed when testing on Windows, that sometimes the connection would not succeed, and furthermore get stuck in a state where racket--cmd-connecting-p was left non-nil. This commit fixed that for me. Although this might have some bearing on issue #344 and issue #348, I don't have any reason to think this fixes those. ----------------------------------------------------------------- PROVENANCE: Today I noticed commit 98bb9c7 and commit cedf4ba linked to from the above issues. But I do not have either commit in any of my local repos, not even according to `git fsck --lost-found`. WAT. I suspect what happened was that I made a topic branch and pushed a commit, which is why GitHub got it (and apparently will keep it indefinitely because of the link from comments). But then I deleted the branch without merging. Or possibly that commit was rebased away before merging the branch. Probably this happened on a new Windows laptop. In my defense, mid-January I was moving between Mac and Windows, as part of an effort to improve racket-mode support on the latter. And then, a Linux laptop got added to the mix, as well. In any case I'm going to recover and use this commit, now. The bit above the horizontal line is the commit message.
I noticed when testing on Windows, that sometimes the connection would not succeed, and furthermore get stuck in a state where racket--cmd-connecting-p was left non-nil. This commit fixed that for me. Although this might have some bearing on issue #344 and issue #348, I don't have any reason to think this fixes those. ----------------------------------------------------------------- PROVENANCE: Today I noticed commit 98bb9c7 and commit cedf4ba linked to from the above issues. But I do not have either commit in any of my local repos, not even according to `git fsck --lost-found`. WAT. I suspect what happened was that I made a topic branch and pushed a commit, which is why GitHub got it (and apparently will keep it indefinitely because of the link from comments). But then I deleted the branch without merging. Or possibly that commit was rebased away before merging the branch. Probably this happened on a new Windows laptop. In my defense, mid-January I was moving between Mac and Windows, as part of an effort to improve racket-mode support on the latter. And then, a Linux laptop got added to the mix, as well. In any case I'm going to recover and use this commit, now. The bit above the horizontal line is the commit message.
I'm back again with a different 100% scenario - ref previous issue #318
racket-bug-report
output:I use the
org-plus-contrib
package from their own repository http://orgmode.org/elpa which bundles org mode plus contributed packages.To reproduce this issue:
C-s C-, s TAB
or justracket-mode
to edit the code block in a separate windowC-c '
A couple of observations:
Any typing at the keyboard is inserted into the buffer after
C-g
is pressed and it seemsC-g
works consistently to end the problem.Making a further source code block works fine and doesn't hang and the racket REPL buffer is also still present.
I think this is a
racket-mode
issue rather thanorg-mode
because editing a python code block doesn't prevent company mode completion or cause a CPU spike.The text was updated successfully, but these errors were encountered: