> From: Richard Stallman <[EMAIL PROTECTED]> > Date: Mon, 22 Jan 2007 21:07:03 -0500 > Cc: [email protected] > Reply-To: [EMAIL PROTECTED] > > This should probably be fixed in call-process (I can't use > shell-command-on-region to pipe a region of a buffer through a shell > command if default-directory doesn't exist, for example, and I'd like > to be able to). Perhaps default-directory could default to the value > of temporary-file-directory if it doesn't exist. > > It would be easy to change what call-process does when > default-directory does not exist. What is the best thing for it to do > in that case?
There's no ``best way'', it depends on what code calls call-process. In some cases, you could bind default-directory to something sensible (e.g., invocation-directory), in others you _must_ fail, because the command arguments could use something like "./foo/bar" which precludes us from changing directories. So I think this problem cannot be solved inside call-process, but instead an application (WoMan in this case) should cater to such situations, where it indeed doesn't matter what is the value of default-directory. Another possibility would be to add an optional argument to call-process, which, when non-nil, will bind default-directory to some value that is guaranteed to be an existing directory, if default-directory is nil. Applications like WoMan could then use that optional argument. _______________________________________________ emacs-pretest-bug mailing list [email protected] http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
