Subject: bug#28797: 26.0.90; Improve printing of error on catching file-error in dired

From: Noam Postavsky <[email-masked]>
Date: Tue, 24 Oct 2017 19:33:30 -0400

Tino Calancha <[email-masked]> writes:

> On Sun, 22 Oct 2017, Noam Postavsky wrote:
>

>>The "no" case of dired-test-bug27940 is failing now.  I guess if
>>RECURSIVE is set to nil, we should not try to delete non-empty
>>directories, or maybe just catch the error if it happens?

Just to clarify, I wrote this before I had figured the Bug#11218 issue.
We *are* currently catching the error, but due to Bug#11218 catching
with condition-case-unless-debug (as opposed to condition-case) doesn't
work inside ert tests.

>      * lisp/dired (dired-delete-file): If the dir is non-empty and
>      RECURSIVE is nil then return 'skip and don't try to delete
>      the dir (Bug#28797).

I think it's okay to do this if we think it would be better for users to
avoid triggering the error messages altogether.  But it should be a
separate decision from whether we want condition-case or
condition-case-unless-debug.