On 2021-04-22 02:32, Michael Albinus wrote: > > Hmm. ssh can't always pass environment variables because the remote > > admin may have disabled it, so INSIDE_EMACS isn't always reliable. Is > > testing for TERM == "dumb" sufficient? > Yes. But I don't know, whether emacs-libvterm does the same setting. It seems to. I set the prompt to something really simple: "$ " (debug log snippet below). However, that didn't seem to help with the lockups. What *did* seem to help quite a bit was doing this in my init: ; Have compile mode scroll until the first error. ;;(setq compilation-scroll-output 'first-error) ;;(setq compilation-auto-jump-to-first-error 1) I've been meaning to disable those anyway, but it's a shame these don't seem to work well with TRAMP. Now lockups that need "kill -SIGUSR2" are pretty rare (though they do happen occasionally). I do still need the to every now and then, which is annoying but not nearly as annoying as before. I do still get hangs on "decoding remote file..." and if I , visit the resulting buffer (which may or may not be empty) and it will reload without issue. Again, annoying but not a showstopper. I haven't yet tried emacs 28 to see if the above fixes the signal-9-terminated compiles. David 11:01:33.141006 tramp-process-actions (3) # Waiting for prompts from remote shell...done 11:01:33.141091 tramp-maybe-open-connection (3) # Found remote shell prompt on ‘dgreene-dev’ 11:01:33.141157 tramp-open-shell (5) # Opening remote shell ‘/bin/sh’... 11:01:33.141223 tramp-send-command (6) # exec env TERM='dumb' INSIDE_EMACS='27.2,tramp:2.4.5.27.2' ENV='' HISTFILE=~/.tramp_history PROMPT_COMMAND='' PS1=\#\$\ PS2='' PS3='' /bin/sh 11:01:33.202768 tramp-wait-for-regexp (6) # #$ 11:01:33.202879 tramp-send-command (6) # (cd ~/) 2>/dev/null; echo tramp_exit_status $? 11:01:33.258755 tramp-wait-for-regexp (6) # tramp_exit_status 0 #$ 11:01:33.258876 tramp-open-shell (5) # Opening remote shell ‘/bin/sh’...done 11:01:33.258970 tramp-open-connection-setup-interactive-shell (5) # Setting up remote shell environment 11:01:33.259039 tramp-send-command (6) # set +o vi +o emacs 11:01:33.313578 tramp-wait-for-regexp (6) # #$ 11:01:33.313763 tramp-send-command (6) # stty -inlcr -onlcr -echo kill '^U' erase '^H' 11:01:33.368599 tramp-wait-for-regexp (6) # #$ 11:01:33.368721 tramp-send-command (6) # echo foo 11:01:33.423097 tramp-wait-for-regexp (6) # foo #$ 11:01:33.423252 tramp-open-connection-setup-interactive-shell (5) # Setting shell prompt 11:01:33.423416 tramp-send-command (6) # PS1=///e9364282a97cbba0d7fbd76f9c2169f1\#\$ PS2='' PS3='' PROMPT_COMMAND='' 11:01:33.475982 tramp-wait-for-regexp (6) # ///e9364282a97cbba0d7fbd76f9c2169f1#$ 11:01:33.476293 tramp-open-connection-setup-interactive-shell (5) # Checking system information 11:01:33.476541 tramp-send-command (6) # echo \"`uname -sr`\" 2>/dev/null; echo tramp_exit_status $? 11:01:33.530843 tramp-wait-for-regexp (6) # "Linux 3.10.0-1127.19.1.el7.x86_64" tramp_exit_status 0 ///e9364282a97cbba0d7fbd76f9c2169f1#$