GNU bug report logs - #34338
26.1; delete-file return codes and failures

Previous Next

Package: emacs;

Reported by: Boruch Baum <boruch_baum <at> gmx.com>

Date: Tue, 5 Feb 2019 21:49:02 UTC

Severity: wishlist

Found in version 26.1

Full log


Message #42 received at 34338 <at> debbugs.gnu.org (full text, mbox):

From: Boruch Baum <boruch_baum <at> gmx.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 34338 <at> debbugs.gnu.org
Subject: Re: bug#34338: 26.1; delete-file return codes and failures
Date: Wed, 30 Oct 2019 21:33:29 -0400
On 2019-10-30 23:52, Stefan Kangas wrote:
> Boruch Baum <boruch_baum <at> gmx.com> writes:
>
> Do you have a use-case in mind here?  Can't the caller just check using
> 'file-exists-p' if it matters instead?

It _should_ *always* matter. Did you delete the file or not? If it didn't
matter, why waste your time attempting the deletion?

Having delete-file return the value is: a) consistent with what I think
is the expectation of most CS folks; b) the most efficient, since it
already knows the exact point of any failure, and basically just passes
the return value it gets from the underlying OS.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




This bug report was last modified 5 years and 221 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.