Eshel Yaron writes: Hi Eshel, >> I hope to find a fix, soon. > > Great, thanks. In the meantime my dirty workaround is putting the > following in my init.el: > > (with-eval-after-load 'compile > (require 'tramp-sh)) > > This causes the defvaralias call to happen before > tramp-use-connection-share is localized, which seems to work alright. > The downside is that tramp-sh is loaded the first time I use M-x compile > even if I'm only working locally. In my local environment, I have inverted the definition of the variable alias. This seems to solve the bug. Could you pls try this patch?