When I run compile
, I'm seeing a strange behavior where the shell command is being executed in the parent of default-directory
rather than default-directory
itself. Here's an example of what I'm doing:
(let ((default-directory "~/projects"))
(compile "pwd"))
And here's what shows up in the *compilation*
buffer:
-*-mode: compilation; default-directory: "~/projects/" -*-
Compilation started at Sun Jan 18 14:03:45
pwd
/Users/sixtynorth
Compilation finished at Sun Jan 18 14:03:45
As you can see, on the first line of *compilation*
the default-directory
is correct. But when pwd
actually executes I've been changed to the parent directory. This behavior seems consistent across different directories, commands, etc.
Does anyone have any idea what might be going on? I've poked through the compile
code, but nothing looks suspicious. I've also looked in my shell configuration for anything that might be causing problems, but again nothing jumped out at me. Any thoughts or ideas would be great.
.emacs
. This is on OSX. emacs-version reports "GNU Emacs 24.4.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) of 2014-12-15 on achewood.local".