Subject: bug#28792: 26.0.60; Deleting to a custom trash directory in Dired gives error

From: Andreas Schwab <[email-masked]>
Date: Thu, 12 Oct 2017 16:02:32 +0200

On Okt 12 2017, Kaushal Modi <[email-masked]> wrote:

> OK, but it seems non-standard compared to error messages from Elisp land.
>
> Shouldn't
>
> (file-error Non-regular file Is a directory /home/kmodi/.emacs.d/foo)
>
> look like:
>
> file-error: Non-regular file: /home/kmodi/.emacs.d/foo is a directory
>
> - Why those parentheses?
> - Why are "N" and "I" capitalized in-between that "sentence".. error
> messages are usually sentences without ending in period, right?
> - Above instead looks like a list printed with 3 elements.

No, it contains 4 elements:

- the error symbol (file-error)
- a descriptive string ("Non-regular file")
- the system error as a string ("Is a directory")
- the offending object ("/home/kmodi/.emacs.d/foo")

> Also, the error is not-informative.. the user is trying to trash foo/ and
> knows that foo/ is a directory.. so how would

copy-file does not support copying non-regular files.

Andreas.

-- 
Andreas Schwab, SUSE Labs, [email-masked]
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."