unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: self@gkayaalp.com, eggert@cs.ucla.edu, 28792@debbugs.gnu.org
Subject: bug#28792: 26.0.60; Deleting to a custom trash directory in Dired gives error
Date: Thu, 12 Oct 2017 16:44:53 +0300	[thread overview]
Message-ID: <83wp40lbu2.fsf@gnu.org> (raw)
In-Reply-To: <CAFyQvY17pE3uqk5WFtzXx3vPUGA-_92aS5F7eP_SB4sBjgvUow@mail.gmail.com> (message from Kaushal Modi on Thu, 12 Oct 2017 13:31:49 +0000)

> From: Kaushal Modi <kaushal.modi@gmail.com>
> Date: Thu, 12 Oct 2017 13:31:49 +0000
> Cc: self@gkayaalp.com, eggert@cs.ucla.edu, 28792@debbugs.gnu.org
> 
>  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.

When the error comes from a primitive, and quotes a system error
message, it always looks like this.  E.g., try evaluating this:

  (insert-file-contents "no-such-file")

> 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

No, we put the file last because there could be a list of additional
objects to print.

> - Why those parentheses?

It depends on how did you get the error and where did you pick it up
from: echo area, *Messages*, *scratch*, something else?

> - Why are "N" and "I" capitalized in-between that "sentence".. error messages are usually sentences without
> ending in period, right?

The "error message" in this case is concocted from several parts, each
one has its own capitalization.  We used to lower-case some of that,
but doing sop has its own problems, because the system error messages
can be localized.

> - Above instead looks like a list printed with 3 elements.

That's because it is.

> 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?

It tells you that /home/kmodi/.emacs.d/foo is a directory, not a
regular file.

I'm not saying that the message couldn't be improved, but doing so is
only possible in move-file-to-trash, not in primitives below it.

>  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?

What you see _is_ an error already.

Once again, I think this issue should be resolved so as not to fail
file deletion, but let's not muddy the waters by unrelated aspects,
such as the error message formatting, which works as designed here.
the real problem is elsewhere.





  reply	other threads:[~2017-10-12 13:44 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12  3:26 bug#28792: 26.0.60; Deleting to a custom trash directory in Dired gives error Kaushal Modi
2017-10-12  3:36 ` Kaushal Modi
2017-10-12  3:51   ` Kaushal Modi
2017-10-12 12:50     ` Göktuğ Kayaalp
2017-10-12 12:58       ` Eli Zaretskii
2017-10-12 13:02         ` Kaushal Modi
2017-10-12 13:37         ` Göktuğ Kayaalp
2017-10-12 12:58       ` Kaushal Modi
2017-10-12 13:16         ` Eli Zaretskii
2017-10-12 13:31           ` Kaushal Modi
2017-10-12 13:44             ` Eli Zaretskii [this message]
2017-10-12 14:02             ` Andreas Schwab
2017-10-12 14:06               ` Kaushal Modi
2017-10-12 15:07                 ` Kaushal Modi
2017-10-12 15:15                   ` Eli Zaretskii
2017-10-12 15:27                 ` Andreas Schwab
2017-10-12 15:31                   ` Kaushal Modi
2017-10-12 20:25                   ` Paul Eggert
2017-10-12 21:41                     ` Kaushal Modi
2017-10-15  7:18                       ` Paul Eggert
2017-10-15 13:35                         ` Kaushal Modi
2017-10-15 13:47                           ` Noam Postavsky
2017-10-12 14:24           ` Noam Postavsky
2017-10-12 14:43             ` Drew Adams
2017-10-12 15:07               ` Andreas Schwab
2017-10-12 15:10                 ` Drew Adams
2017-10-12 13:34 ` Tino Calancha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83wp40lbu2.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=28792@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=kaushal.modi@gmail.com \
    --cc=self@gkayaalp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).