I tried to use 'ert-remote-temporary-file-directory' in a test for an external package, but it ended up breaking some existing tests simply by requiring both tramp and ert-x. These tests indirectly used 'cd' (by way of 'compilation-start'), which triggered the failure. Steps to reproduce: $ mkdir -p ~/src $ emacs -Q --batch -l tramp -l ert-x --eval '(cd "~/src/")' Result: Error: error ("No such directory: ~/src/") mapbacktrace(#f(compiled-function (evald func args flags) #)) debug-early-backtrace() debug-early(error (error "No such directory: ~/src/")) error("No such directory: %s" "~/src/") cd("~/src") eval((cd "~/src") t) command-line-1(("-l" "tramp" "-l" "ert-x" "--eval" "(cd \"~/src/\")")) command-line() normal-top-level() No such directory: ~/src/ Looking at ert-x.el, I think this is because 'ert-remote-temporary-file-directory' does some fixup on $HOME, but it was too aggressive. See attached.