Hi, shell-process-popd (in lisp/shell.el) is currently unaware of comint-file-name-prefix. This is inconsistent with the behavior of shell-process-pushd and shell-process-cd, and hampers proper directory tracking in tramp remote shells (see http://lists.gnu.org/archive/html/tramp-devel/2010-11/msg00013.html ). The attached patch should correct this oversight. This is my first stab at contributing to emacs so please be patient and forgiving if I did not do it right or missed something. Best regards, Christian.