bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Noam Postavsky
Subject: bug#28797: 26.0.90; Improve printing of error on catching file-error in dired
Date: Fri, 13 Oct 2017 09:15:01 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> Here's a patch, uses error-message-string for #1,
>
> This doesn't handle all of the parts of the complaint, does it?

The resulting error will look like

    file-error: Non-regular file: Is a directory, /home/kmodi/.emacs.d/foo

It's not quite the perfect sentence envisioned on the OP, but it gets
all the information across, with punctuation separating the parts.

    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.

For this part:

    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?

I guess what would help is printing "there is a bug with Emacs renaming
a directory across filesystems", but that seems a bit out of reach for a
simple error formatting function...

>> condition-case-unless-debug for #2.
>
> This is quite a radical change in very old behavior, so if it is
> deemed a good idea, it should go to master.

Hmm, it doesn't seem that radical to me, but I don't have a problem
putting it only to master, or even not doing that at all and just saying
the user should use debug-on-signal.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]