help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: apply start-process fails because of invalid current directory


From: Stefan Monnier
Subject: Re: apply start-process fails because of invalid current directory
Date: Wed, 31 Jul 2013 14:19:11 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> When problem occured I looked at default-directory and if I'm not
> mistaken it was not set to y:/

Maybe you looked in a different buffer: each buffer has its own notion
of default-directory.

SM> If your process doesn't use the current directory, then the
SM> Elisp code that runs it should explicitly rebind
SM> `default-directory' to some "safe" choice
SM> (e.g. (expand-file-name "~/")) around the call to start-process.

> Is that not what is supposed to do start-process?

It could, but that would be risky, if you do (start-process "rm -rf
foo") and Emacs decides "oh I can't find the current directory, let's
run this from $HOME instead".
So you have to do it by hand, explicitly.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]