-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Haskell Interactive Shell is stuck when started #3271
Comments
Hm. When I open any |
@d12frosted Thanks for the input. I will try again on develop. Could you let me know if |
@PierreR I don't understand what you expect from |
@d12frosted Well it is the only ( |
Ah I see. Sorry, I misunderstood you. Well yeah, it looks like broken thing. Cause it's intended to return from REPL to previous buffer. I'll look into it. Thanks for noticing :) |
@PierreR, |
Thanks ! I will try it asap. |
- update section about setting up PATH by updating value of =exec-path= (previously it was saying to update it in =user-init= function, but looks like you need to do it in =user-config=) - following syl20bnr#1718 - add FAQ section - add note about setting up =stack-ghci= as =haskell-process= (as noted in syl20bnr#2142) - add note about fixing problems with =ghc-mod= and =stack= - add note about fixing stuck REPL (following syl20bnr#3271)
- update section about setting up PATH by updating value of =exec-path= (previously it was saying to update it in =user-init= function, but looks like you need to do it in =user-config=) - following #1718 - add FAQ section - add note about setting up =stack-ghci= as =haskell-process= (as noted in #2142) - add note about fixing problems with =ghc-mod= and =stack= - add note about fixing stuck REPL (following #3271)
There is a FAQ entry now in the Haskell README for this problem, but it would be nice to actually get it fixed. |
Yeah, I do understand, but I can't think about any good way for fixing this. I can't understand why when you exit |
You see, the problem is actually not with haskell REPL, but with normal mode -> edit mode itself. When I try to enter normal mode when cursor is at the end of line it moves 1 character left. Then I move back to edit mode - and it doesn't move at the original place. The same in VIM. Just tested. Updated So I am not sure what to do with it. But I'll try to think of something. |
Well yeah, that's common behaviour of course. It doesn't cause other comint-like modes to hang, though, so something is different about this one. |
Anyway, for vimmers who want to get into using REPLs in Emacs, you might as well get into the habit of almost always entering insert state in a REPL with |
Sorry for spam. :-) This is also an option: (add-hook 'haskell-interactive-mode-hook
(lambda ()
(setq-local evil-move-cursor-back nil))) |
@TheBB I would not mind but can we at least open the That's what is happening when you open a shell in emacs IIRC (you are in insert mode by default) |
Wow. This is really an option! I was thinking about checking if cursor is on the line that begins with About
It's opening with insert mode for me. But that's probably because I use |
Well, that looks bad. What font are you using? |
Well you know what. You asking me this question makes me check about the font I thought I was using ... And for some reason, it was not installed. So thanks 😊 |
Then I did a right thing to ask you about font before asking you to open separate issue for this 😄 |
@TheBB What do you think about this issue? I know that you wanted it to be fixed, instead of just being documented, but... It looks like it's just a matter of using workaround or just being cautious about where you type. |
Why not changing
as suggested in the help ? |
I created PR #3292 that makes what you suggest. But after short discussion I thought that it's better to leave this option to users, since doing both things is an over kill. But different users might prefer different workarounds for this problem. Some might want to set |
I will close it then. Thanks for the support. |
When you fire up an interactive shell in Haskell (
haskell-interactive-bring
withSPC m s s
), you end up being in a kind of "stuck mode". From this state (wrongly the normal state), if you try to pressi
to enter the insert state, you will quickly realize you cannot pressRET
to evaluate the line. Nothing is actually working, no completion, ... you can just enter characters.A workaround described in issue #445, is to press
c-c c-k
and thenA
but this is just a workaround and you will quickly be back in this "stuck-mode" if you leave the insert state and come back again. That's why in issue #445 it is advised to usec-o SPC
in order to stay in insert mode.There is another trick described by @meditans in #445 that also works and is less awkward compared to
c-c c-k
:Still, the whole process makes the use of the interactive repl in Haskell a rather painful experience. This is a shame because this internal repl is tremendously useful indeed.
Would it be possible to go directly in an non-stuck insert mode whenever we use
haskell-interactive-bring
? Even better would it be possible to prevent the stuck mode completely (I don't really see how it is useful).Additional info: using spacemacs
0.104.2
, default shell iszsh
.The text was updated successfully, but these errors were encountered: