From: Eli Zaretskii <eliz@gnu.org>
To: Boruch Baum <boruch_baum@gmx.com>
Cc: 34338@debbugs.gnu.org
Subject: bug#34338: 26.1; delete-file return codes and failures
Date: Thu, 07 Feb 2019 05:36:00 +0200 [thread overview]
Message-ID: <83ef8ks21r.fsf@gnu.org> (raw)
In-Reply-To: <20190206210211.f6ugtim5ie22nkd4@E15-2016.optimum.net> (message from Boruch Baum on Wed, 6 Feb 2019 16:02:11 -0500)
> Date: Wed, 6 Feb 2019 16:02:11 -0500
> From: Boruch Baum <boruch_baum@gmx.com>
> Cc: 34338@debbugs.gnu.org
>
> > > B2) raise an error when (not NOERROR) and:
> > >
> > > B2.1) file doesn't exist
> > >
> > > B2.2) (and (chmod -w) (not FORCE))
> > >
> > > B2.3) another form of permission denial is encountered
> >
> > !ERROR and either of the following, or all of them?
>
> Either.
>
> > In any case, you propose a backward-incompatible change in behavior,
> > so it won't fly. We could perhaps do it the other way around: add a
> > new optional argument ERROR-OUT, which, when non-nil, will cause the
> > function to signal an error when B2.1 or B2.2 happen (I believe B2.3
> > already causes an error). And similarly with FORCE.
>
> > IOW
> > ... (snip) ...
>
> The part that would transform a prior condition of 'crash' to some
> return value is a kind of backward-incompatibility that I think most
> people would appreciate.
I'm more worried about the opposite: signaling an error where we
currently silently do nothing.
> For a proposed FORCE arg, backward-incompatibility is a positive
> feature, a bug-fix
Sorry, it's too late to fix such "bugs" in veteran interfaces. We
must do that in backward-compatible way.
> > > C) maybe log the exact error or reason for nil to *Messages*.
> >
> > Not sure what you mean by "exact error or reason", I believe we
> > already log the reason.
>
> For me, in response chmod -x $parent_dir, the error message is:
>
> eval: Removing old name: Permission denied, /home/boruch/foo/bar
>
> And the response to chattr +i bar
>
> eval: Removing old name: Operation not permitted, /home/boruch/foo/bar
>
> So the messages are unique, but not clear.
The description comes from the error code returned by a C library
function. Doing more than that would mean additional checks, which
will be expensive and probably non-portable. I don't see the benefit.
I mean, why isn't "Operation not permitted" enough, it tells you that
your user is not permitted to do that, which is clear enough IMO.
next prev parent reply other threads:[~2019-02-07 3:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-05 21:47 bug#34338: 26.1; delete-file return codes and failures Boruch Baum
2019-02-06 8:24 ` Michael Albinus
2019-02-06 9:35 ` Boruch Baum
2019-02-06 16:19 ` Eli Zaretskii
2019-02-06 21:02 ` Boruch Baum
2019-02-07 3:36 ` Eli Zaretskii [this message]
2019-02-07 5:14 ` Boruch Baum
2019-10-09 11:48 ` Stefan Kangas
2019-10-30 21:07 ` Stefan Kangas
2019-10-30 22:22 ` Boruch Baum
2019-10-30 22:52 ` Stefan Kangas
2019-10-31 1:33 ` Boruch Baum
2019-10-31 14:32 ` Eli Zaretskii
2019-11-01 9:34 ` Boruch Baum
2019-11-01 9:55 ` Eli Zaretskii
2019-11-08 13:00 ` Stefan Kangas
2019-10-31 14:01 ` Eli Zaretskii
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=83ef8ks21r.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=34338@debbugs.gnu.org \
--cc=boruch_baum@gmx.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).