davidmiller / pony-mode

Django mode for emacs
Other
149 stars 32 forks source link

Bind default-directory instead of using cd #68

Closed ryuslash closed 11 years ago

ryuslash commented 11 years ago

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.