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

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

bug#69606: [PATCH] Ensure default-directory exists when generating diff


From: Michael Albinus
Subject: bug#69606: [PATCH] Ensure default-directory exists when generating diff
Date: Sat, 09 Mar 2024 17:45:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Philip Kaludercic <philipk@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.





reply via email to

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