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

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

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


From: Chris Moore
Subject: M-x dirs RET doesn't work when there are spaces in the directory's name
Date: Thu, 01 Mar 2007 07:54:22 +0100

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?

In GNU Emacs 22.0.94.2 (i686-pc-linux-gnu, GTK+ Version 2.8.20)
 of 2007-02-26 on trpaslik
X server distributor `The X.Org Foundation', version 11.0.70101000
configured using `configure  '--with-gtk' '--prefix' '/usr/local' '--with-xpm' 
'--with-jpeg' '--with-png' '--with-gif''




reply via email to

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