GNU bug report logs - #5771
23.1; compile command with cd to new dir

Previous Next

Package: emacs;

Reported by: Kevin Ryde <user42 <at> zip.com.au>

Date: Thu, 25 Mar 2010 22:28:02 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Kevin Ryde <user42 <at> zip.com.au>
Cc: 5771 <at> debbugs.gnu.org
Subject: bug#5771: 23.1; compile command with cd to new dir
Date: Sun, 28 Mar 2010 15:53:58 -0400
>     (compile "mkdir /tmp/newdir;\n cd /tmp/newdir;\n echo hi")
>
> gets an emacs error
>
>     => /tmp/newdir/: no such directory
>
> and doesn't run the command.  I hoped that no matter what the command
> string contains that emacs would start it.

The problem was that compile had this faulty regexp test:

(string-match "^\\s *cd\\(?:\\s +\\(\\S +?\\)\\)?\\s *[;&\n]" command)

The `^' matches characters after newlines, which is not what's intended;
we want to match only the beginning of the string, with `\''.  I've
checked in a fix; thanks for the bug report.




This bug report was last modified 15 years and 78 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.