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

From: Kaushal Modi <[email-masked]>
Date: Thu, 12 Oct 2017 14:56:08 +0000

Hello,

This is a spin-off bug report from
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28792#29

This bug report is to do with:

1. Improving the format of error messages generated by catching error
signals from C, so that the errors look almost like readable English
instead of a dump of a list.
2. Those errors should generate a backtrace.. right now, a user needs to
update the debug-on-message variable to force back traces for such messages
which is, first: more cumbersome than doing M-x toggle-debug-on-error and
then recreating the error, and second: not a common knowledge.

Excerpt from the above referenced debbugs thread for continuity:

=====
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 the below help?

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

-- 

Kaushal Modi