On Thu, Oct 12, 2017 at 9:16 AM Eli Zaretskii <eliz@gnu.org> wrote:
FWIW, I see no problem with the error message, we produce such error
messages in quite a few other places in fileio.c.  The capitalization
seems okay, too.

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.

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

(file-error Non-regular file Is a directory /home/kmodi/.emacs.d/foo) 

help?
 
As for lack of backtrace, that's because the error comes from a C
primitive.

For the lack of better understanding, isn't it possible to set the "severity" of certain messages to be of Error status (or something like that), so that a backtrace automatically analogous to what I get on my above-mentioned debug-on-message setting?
--

Kaushal Modi