[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 9dc306b1: Improve reporting of I/O, access errors

From: Michael Albinus
Subject: Re: master 9dc306b1: Improve reporting of I/O, access errors
Date: Wed, 18 Sep 2019 09:41:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

address@hidden (Paul Eggert) writes:


> diff --git a/etc/NEWS b/etc/NEWS
> index 9aec8da..dce4903 100644
> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -2005,6 +2005,16 @@ file name if there is no user named "foo".
>  ** The FILENAME argument to 'file-name-base' is now mandatory and no
>  longer defaults to 'buffer-file-name'.
> ++++
> +** File metadata primitives now signal an error if I/O, access, or
> +other serious errors prevent them from determining the result.
> +Formerly, these functions often (though not always) returned nil.
> +For example, if the directory /etc/firewalld is not searchable,
> +(file-symlink-p "/etc/firewalld/firewalld.conf") now signals an error
> +instead of returning nil, because file-symlink-p cannot determine
> +whether a symbolic link exists there.  These functions still behave as
> +before if the only problem is that the file does not exist.

That is a serious API change, and I fear it will break existing
code. For example, Tramp trusts on file-attributes returning nil, when a
file does not exist or is not accessible for whatever reason. This is
true also for local files.

Furthermore, Tramp does not report anything but nil if a remote file is
not accessible due to I/O errors. So the promise of this change cannot
be kept for all situations.

I didn't follow the discussion for this, but is it really worth to break
existing code?

(And at least, this paragraph belongs to "Incompatible Lisp Changes in
Emacs 27.1" in NEWS)

Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]