From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <83wp40lbu2.fsf@gnu.org> References: <83zi8wld5l.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1507816132 1302 195.159.176.226 (12 Oct 2017 13:48:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 12 Oct 2017 13:48:52 +0000 (UTC) Cc: self@gkayaalp.com, eggert@cs.ucla.edu, 28792@debbugs.gnu.org To: Kaushal Modi Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 12 15:48:41 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2dqq-0007Ma-7U for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Oct 2017 15:48:40 +0200 Original-Received: from localhost ([::1]:45664 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2dqx-00070X-Nj for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Oct 2017 09:48:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57126) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2doL-00055o-Vw for bug-gnu-emacs@gnu.org; Thu, 12 Oct 2017 09:46:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e2doH-00080X-UM for bug-gnu-emacs@gnu.org; Thu, 12 Oct 2017 09:46:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54599) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e2doH-00080B-Rg for bug-gnu-emacs@gnu.org; Thu, 12 Oct 2017 09:46:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e2doH-0007u4-Is for bug-gnu-emacs@gnu.org; Thu, 12 Oct 2017 09:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Oct 2017 13:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28792 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28792-submit@debbugs.gnu.org id=B28792.150781592030325 (code B ref 28792); Thu, 12 Oct 2017 13:46:01 +0000 Original-Received: (at 28792) by debbugs.gnu.org; 12 Oct 2017 13:45:20 +0000 Original-Received: from localhost ([127.0.0.1]:35047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2dnb-0007t3-PE for submit@debbugs.gnu.org; Thu, 12 Oct 2017 09:45:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37613) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2dnY-0007sm-An for 28792@debbugs.gnu.org; Thu, 12 Oct 2017 09:45:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e2dnN-0006Bw-04 for 28792@debbugs.gnu.org; Thu, 12 Oct 2017 09:45:11 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43258) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2dnM-0006BX-Ry; Thu, 12 Oct 2017 09:45:04 -0400 Original-Received: from [176.228.60.248] (port=2041 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e2dnM-00086a-6T; Thu, 12 Oct 2017 09:45:04 -0400 In-reply-to: (message from Kaushal Modi on Thu, 12 Oct 2017 13:31:49 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:138278 Archived-At: > From: Kaushal Modi > 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.