Usually C-a
moves point to just after the prompt:
andreas@my-computer:~/some/folder
$ #here
but occasionally something happens and C-a
starts to the beginning of line:
andreas@my-computer:~/some/folder
#here
I have no idea why this happens, and the only way I've been able to fix it is to restart Emacs. How can I revert C-a
to the normal behavior of moving to the point after the prompt?
C-a
both when it's working and when it isn't: you can do that withC-h c C-a RET
. If they are different, that might provide a clue. Also, check that the mode is stillshell-mode
(e.g, withC-h v major-mode RET
). – NickD Mar 16 '18 at 16:30C-c C-c
doesn't work on long-running processes inside the shell, it fails with "Text is read only". – Andreas Jansson Mar 16 '18 at 16:43M-x shell-mode RET
when it's in the funky state? Maybe that will restore the proper C-a behavior. – NickD Mar 16 '18 at 17:32comint-bol
? – NickD Mar 16 '18 at 17:33