From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#43723: 27.1; Errors in file-extended-attributes prevent from saving buffer Date: Tue, 07 Jun 2022 14:35:17 +0300 Message-ID: <83leu87ll6.fsf@gnu.org> References: <83sgaziav1.fsf@gnu.org> <87zgiprccq.fsf@gnus.org> <8335gh91ip.fsf@gnu.org> <87mteoomdi.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17581"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43723@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 07 14:20:52 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nyYCZ-0004NE-CL for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Jun 2022 14:20:51 +0200 Original-Received: from localhost ([::1]:39752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyYCY-0005JQ-6D for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Jun 2022 08:20:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39222) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyXVB-0006ij-WA for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2022 07:36:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44821) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nyXVB-00062M-OV for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2022 07:36:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nyXVB-00005F-M5 for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2022 07:36:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Jun 2022 11:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43723 X-GNU-PR-Package: emacs Original-Received: via spool by 43723-submit@debbugs.gnu.org id=B43723.165460173432737 (code B ref 43723); Tue, 07 Jun 2022 11:36:01 +0000 Original-Received: (at 43723) by debbugs.gnu.org; 7 Jun 2022 11:35:34 +0000 Original-Received: from localhost ([127.0.0.1]:38715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyXUk-0008Vw-Hr for submit@debbugs.gnu.org; Tue, 07 Jun 2022 07:35:34 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54032) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyXUj-0008Vf-HO for 43723@debbugs.gnu.org; Tue, 07 Jun 2022 07:35:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60458) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyXUe-0005vn-9L; Tue, 07 Jun 2022 07:35:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=YrJnBGQWBLlbpCTEY9X0EF7+4TMGY5Litc6hap/8+vM=; b=LBBcge7CBzkR xBxIM8GA2ioyYFcVy1QGqV+grwUsAdH2T43IBA9qq61FWTOdzTHR71J/WD7X0nJDesaEwEfxWcVc1 Z5eMecI5iEzDpPIROqGWZLrzA0cOqLXdzIO2lHXgUVeg7mO8+j5JD6wx/v40eHvq22cXWYDN+HqQk 8NRpcL7NKuTCkA0xm4cORVLH851A9ztU6hm/PB4QKm/igTBWIC8VAtIJtIKQwi3WItnGQKEF9cK5N XKN71VIA9bwdhh2bcFKB1p+3FGkRmHtlFH/q4iakDM0lXSFLV9hahqO8+M/WSgwLuUBoOSPhUrAsc s/JbFvRri2L0XEi1xIBbGQ==; Original-Received: from [87.69.77.57] (port=1596 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyXUd-0000ST-NZ; Tue, 07 Jun 2022 07:35:28 -0400 In-Reply-To: <87mteoomdi.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue, 07 Jun 2022 11:26:17 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:233866 Archived-At: > From: Lars Ingebrigtsen > Cc: 43723@debbugs.gnu.org > Date: Tue, 07 Jun 2022 11:26:17 +0200 > > Eli Zaretskii writes: > > > You can easily simulate this situation by writing a replacement for > > file-acl that always signals a file-error, or advising it to that > > effect. > > It's always better to have an actual test case so that we're not fixing > the wrong thing... Yes, but all of my actual examples were fixed "by other means". So only the theoretical issue is left. > But in this case, I guess it's `set-file-extended-attributes' that > should be signalling an error if we want to emulate the problem? > `file-acl' would presumably just return nil in these cases, so there'd > be no warnings or errors? No, the problem is exactly that file-extended-attributes signals an error. The set-file-extended-attributes part is handled correctly: ;; If set-file-extended-attributes fails, fall back on ;; set-file-modes. (unless (with-demoted-errors "Error setting attributes: %s" (set-file-extended-attributes buffer-file-name (nth 1 setmodes))) (set-file-modes buffer-file-name (logior (car setmodes) 128))))) Which to me is just one more argument in favor of showing a simple message when file-extended-attributes fails, instead of signaling an error and breaking the save-buffer command.