GNU bug report logs -
#69606
[PATCH] Ensure default-directory exists when generating diff
Previous Next
Reported by: Philip Kaludercic <philipk <at> posteo.net>
Date: Thu, 7 Mar 2024 09:29:01 UTC
Severity: normal
Tags: patch
Fixed in version 31.1
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 69606 <at> debbugs.gnu.org (full text, mbox):
Philip Kaludercic <philipk <at> posteo.net> writes:
Hi Philip,
> The reason I was thinking about a more general solution, is that
> something like
>
> (let ((default-directory "/this/does/not/exists"))
> (make-process :command '("true")))
>
> will always fail, even though "true" doesn't use the current working
> directory. I think it would be useful to have some :fallback option for
> these situations, to ensure that if `default-directory' doesn't exist,
> any other directory should be used instead.
This is a more general request than just make it work for "diff".
Well, there is a reason that `default-directory' isn't set to something
else behind your back, if it doesn't exist. Processes can use relative
file names as arguments, and it is always better to fail with an error
message instead of doing something unexpected you even don't know about.
Best regards, Michael.
This bug report was last modified 85 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.