Subject: Re: 23.1; compile command with cd to new dir

From: Chong Yidong <[email-masked]>
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.