Working on source code in Emacs 28.2 on Mac, shell command M-! works as expected, and the command runs fine. The command M-x shell successfully launches a shell window, but then after running a shell command (such as ls -l), Emacs hangs. I have to force quit. I am running bash shell. I am also getting this behavior in Aquamacs. Any suggestions? Thanks.
1 Answer
I'd be willing to bet it's something with your shell's setup. Start with a reduced (or no) init, or disable fancy features. Very early in my ZSH init, at top of my ~/.zshrc I have:
## tramp gets hung up on precmd(), unset some features if [[ "$TERM" == "dumb" ]]; then unsetopt zle unsetopt prompt_cr unsetopt prompt_subst unfunction precmd unfunction preexec PS1='$ ' return fi Note the basic prompt, and that we bail out of initialization with the return. In fact, that's probably all you'd need for Bash.
- Note, that I reference
trampin snippet's comment, but this would apply toM-x shellas well, as the both set TERM to "dumb".nega– nega2024-07-01 19:13:52 +00:00Commented Jul 1, 2024 at 19:13
Working on source code in Emacs 28.2...- what does that mean? Does it mean you built Emacs from source? When the shell window is launched, do you get a prompt where you type thels -lor is there no prompt?force quitmean you pressedC-gand that stopped the spinning?