emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: M-x dirs RET doesn't work when there are spaces in the directory's n


From: Lennart Borgman (gmail)
Subject: Re: M-x dirs RET doesn't work when there are spaces in the directory's name
Date: Thu, 01 Mar 2007 11:20:53 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666

Chris Moore wrote:
Sometimes the *shell* buffer's directory tracking gets out of sync
with its inferior shell process.  In such cases, "M-x dirs RET"
usually fixes the problem, but this doesn't work if there is a space
in the directory's name:

M-x shell RET
$ cd /tmp
$ mkdir 'one two'
$ X='one two'; cd "$X"
[ using $X here to deliberately confused comint ]
M-x dirs RET => "Couldn't cd"

I see "$ dirs" and "/tmp/one two" shown in the *shell* buffer, but an
attempt is made to cd to "/tmp/one", rather than to "/tmp/one two".

I realise that it's not possible to parse the output of 'dirs', since
spaces in the path look identical to spaces separating the paths, but
perhaps "dirs +0" could be used when it is detected that the shell is
bash?


Just for the records: The command M-x dirs RET does not work at all for *shell* buffers on w32 where the shell process runs cmd.exe.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]