unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@users.sourceforge.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 28797@debbugs.gnu.org, tino.calancha@gmail.com, kaushal.modi@gmail.com
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	[thread overview]
Message-ID: <871sm7b356.fsf@users.sourceforge.net> (raw)
In-Reply-To: <83y3ofjuer.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 13 Oct 2017 11:58:52 +0300")

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	other threads:[~2017-10-13 13:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12 14:56 bug#28797: 26.0.90; Improve printing of error on catching file-error in dired Kaushal Modi
2017-10-12 15:08 ` Noam Postavsky
2017-10-13  3:16 ` Noam Postavsky
2017-10-13  8:58   ` Eli Zaretskii
2017-10-13 13:15     ` Noam Postavsky [this message]
2017-10-13 13:43       ` Eli Zaretskii
2017-10-22 16:28         ` Noam Postavsky
2017-10-24 15:41           ` Tino Calancha
2017-10-24 23:33             ` Noam Postavsky
2017-11-05 17:20         ` Noam Postavsky

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=871sm7b356.fsf@users.sourceforge.net \
    --to=npostavs@users.sourceforge.net \
    --cc=28797@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=kaushal.modi@gmail.com \
    --cc=tino.calancha@gmail.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).