I could only find that cd was being used to set the correct
directory when calling shell commands, though I could be wrong and
have overlooked something. I've been using this patch for some weeks
now and everything still seems to work correctly.
Using cd in this way causes the default-directory for the buffer
where whichever command that calls cd was started to be changed
permanently, using cd to switch it back didn't work because there
would be called in a different buffer.
For use with shell-command* just let-binding default-directory
should be enough to ensure shell commands run in the right directory.
I could only find that
cd
was being used to set the correct directory when calling shell commands, though I could be wrong and have overlooked something. I've been using this patch for some weeks now and everything still seems to work correctly.Using
cd
in this way causes thedefault-directory
for the buffer where whichever command that callscd
was started to be changed permanently, usingcd
to switch it back didn't work because there would be called in a different buffer.For use with
shell-command*
just let-bindingdefault-directory
should be enough to ensure shell commands run in the right directory.