In emacs, I press M-x shell to create a shell in a buffer.
In the shell, I can use autocomplete file names with respect to the current working directory.
If outside the shell e.g. in Nautilus, I move the current directory somewhere else, then back in the shell, the autocompletion of file names will not be working correctly, still with respect to the old pathname of the current working directory.
I tried to refresh the buffer of the shell by M-x revert-buffer, but it didn't work because the buffer didn't open a file but a shell.
How can I solve the problem?
Thanks.