From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Improve reporting of I/O, access errors for Emacs Date: Thu, 12 Sep 2019 21:04:18 +0300 Message-ID: <83d0g51jdp.fsf@gnu.org> References: Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="50971"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 12 20:04:50 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i8TSb-000D8x-TW for ged-emacs-devel@m.gmane.org; Thu, 12 Sep 2019 20:04:50 +0200 Original-Received: from localhost ([::1]:37514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8TSa-0001CC-5S for ged-emacs-devel@m.gmane.org; Thu, 12 Sep 2019 14:04:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52587) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8TRy-0001Bx-4X for Emacs-devel@gnu.org; Thu, 12 Sep 2019 14:04:10 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38814) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i8TRx-0005cw-JD; Thu, 12 Sep 2019 14:04:09 -0400 Original-Received: from [176.228.60.248] (port=1046 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i8TRx-0000Cd-24; Thu, 12 Sep 2019 14:04:09 -0400 In-reply-to: (message from Paul Eggert on Thu, 12 Sep 2019 01:22:09 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239998 Archived-At: > From: Paul Eggert > Date: Thu, 12 Sep 2019 01:22:09 -0700 > > The basic idea is that Emacs should signal an error for serious and > unexpected I/O errors (e.g., EIO, ENAMETOOLONG) Why is that a good idea in general? Emacs should do that when it needs to operate on a file (like copy or rename or delete it), but cannot due to some I/O error, that's a given. But if Emacs just needs to return some information about a file, and the file turns out to be inaccessible, why do we need to signal an error instead of just returning a failure indication? IOW, I think your changes cause error signaling on too low a level, where we cannot know whether signaling an error is or isn't a Good Thing. We should instead have such logic on higher levels, where the semantics and the meaning of errors are clear. Otherwise, we risk breaking a lot of code which will suddenly need to deal with errors it never saw before.