Subject: bug#15417: (compile "cd /u*r && ... cd: No such directory found via CDPATH environment variable

From: Kevin Rodgers <[email-masked]>
Date: Wed, 25 Sep 2013 23:45:18 -0600

On 9/25/13 11:06 AM, Stefan Monnier wrote:
>> Why is this a bug?  i.e. is there a /u*r directory, and do its permissions
>
> Yes, in the shell (which is normally what runs this command), "cd /u*r"
> will probably succeed by expanding "/u*r" to "/usr".
> But the hack I added to "M-x compile" which tries to recognize a leading
> "cd<blabla>" gets in the way.

Ah, I see.

Seems like after extracting the <blabla> arg and substituting the values
of any referenced environment variables (already implemented by the
current hack), you could pass the result to file-expand-wildcards.  Then
check that there is only a single directory in the result, and pass that
directory to `cd'.

-- 
Kevin Rodgers
Denver, Colorado, USA