I encounter this quite a lot. when I open a emacs shell and run M-x dirs it will complain to me that:couldn't cd or sometimes just hang emacs what is the solution for this ?
What shell are you running? I am using: GNU Emacs 23.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.1) of 2012-02-07; not the eshell, but the builtin emacs shell
Have you customized shell-dirstack-query? tried, but I don't have this variable in my emacs
Are you issuing M-x dirs at the shell prompt? yes
Does the dirs command do what it normally does? yes, sometimes
What does your prompt look like? if it finished successfully then it will echo dirs and the PWD
@Gilles
shell-dirstack-query? Are you issuingM-x dirsat the shell prompt? Does thedirscommand do what it normally does? What does your prompt look like? – Gilles Mar 8 at 22:07