unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: emacs-devel@gnu.org
Subject: Re: master 9dc306b1: Improve reporting of I/O, access errors
Date: Fri, 20 Sep 2019 21:22:43 +0200	[thread overview]
Message-ID: <877e62pybg.fsf@gmx.de> (raw)
In-Reply-To: <8f07c201-09bf-c090-bb08-e058101bdc56@cs.ucla.edu> (Paul Eggert's message of "Fri, 20 Sep 2019 12:05:10 -0700")

Paul Eggert <eggert@cs.ucla.edu> writes:

Hi Paul,

>> For such signals we have `access-file'. We shouldn't move its
>> functionality to `file-attributes'.
>
> access-file is different: it signals an error if you cannot access
> (actually, read) a file, and if you cannot access the file because you
> cannot search its parent directory then that's simply another reason
> that you cannot access the file. In contrast, a predicate like
> file-exists-p is supposed to tell you whether the file exists
> regardless of whether you can access it.

I'm speaking about file-attributes, not file-exists-p, which should not
raise an error when a file cannot be accessed.

My point is that file-attributes shall return nil, if it cannot provide
the information, for *whatever* reason. That's the contract of
file-attributes for decades.

If I want to know whether a file exists, or whether a file is
accessible, I use file-exists-p or access-file.


Best regards, Michael.



      reply	other threads:[~2019-09-20 19:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190918022442.11082.40975@vcs0.savannah.gnu.org>
     [not found] ` <20190918022444.103AC207F5@vcs0.savannah.gnu.org>
2019-09-18  7:41   ` master 9dc306b1: Improve reporting of I/O, access errors Michael Albinus
2019-09-18  7:44     ` Michael Albinus
2019-09-20  0:21     ` Paul Eggert
2019-09-20  5:48       ` Eli Zaretskii
2019-09-20 12:43       ` Michael Albinus
2019-09-20 19:05         ` Paul Eggert
2019-09-20 19:22           ` Michael Albinus [this message]

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=877e62pybg.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    /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).