On one computer I use, my emacs will always run commands in my home directory, rather than the directory of the currently open file (i.e. default-directory
).
A standalone reproduction is executing the following:
(let ((default-directory "/tmp/")) (compile "pwd"))
On the computer in question, it prints the path to my home, not /tmp
as it does on all other computers-with-emacs I have access to. (The same thing happens with M-!
/M-x shell-command
.)
I recently installed 24.5 into my user folder (the global install is 23.4), and installed Emacs Prelude but the behaviour described above happened/happens in all configurations (it certainly happened before I made any modifications) and happens if I run emacs -Q
(for both 24.5 and 23.4) to avoid reading my configurations (as lawlist asks).
If there's no obvious problem/fix, is there a good way to start to debug a problem like this?
Emacs -Q
If not, then consider bisecting your user configuration (commenting stuff out) until you find the culprit. – lawlist Oct 7 '15 at 0:08-x
option if it's a typical Unix shell (bash, zsh, tcsh, …). – Gilles 'SO- stop being evil' Oct 7 '15 at 14:27