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#46397: 27.1; Cannot delete buffer pointing to a file in a path that includes a file Date: Fri, 12 Feb 2021 09:15:38 +0200 Message-ID: <83tuqhg3j9.fsf@gnu.org> References: <87h7mllgin.fsf@nexoid.at> <83a6scj745.fsf@gnu.org> <39d0e035-27b6-e2bd-daa2-747dda2c1a35@cs.ucla.edu> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38496"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gmatta@gmail.com, 46397@debbugs.gnu.org, craven@gmx.net To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 12 08:16:14 2021 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 1lASgY-0009ue-Ao for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 Feb 2021 08:16:14 +0100 Original-Received: from localhost ([::1]:33526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lASgX-0007F3-DH for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 Feb 2021 02:16:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lASgM-0007ER-5c for bug-gnu-emacs@gnu.org; Fri, 12 Feb 2021 02:16:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48275) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lASgL-00084W-V0 for bug-gnu-emacs@gnu.org; Fri, 12 Feb 2021 02:16:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lASgL-0004L7-Qy for bug-gnu-emacs@gnu.org; Fri, 12 Feb 2021 02:16:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Feb 2021 07:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46397 X-GNU-PR-Package: emacs Original-Received: via spool by 46397-submit@debbugs.gnu.org id=B46397.161311415016660 (code B ref 46397); Fri, 12 Feb 2021 07:16:01 +0000 Original-Received: (at 46397) by debbugs.gnu.org; 12 Feb 2021 07:15:50 +0000 Original-Received: from localhost ([127.0.0.1]:59821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lASg9-0004Kd-S2 for submit@debbugs.gnu.org; Fri, 12 Feb 2021 02:15:50 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lASg7-0004KQ-5G for 46397@debbugs.gnu.org; Fri, 12 Feb 2021 02:15:47 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60834) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lASfz-0007vH-Dx; Fri, 12 Feb 2021 02:15:41 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1657 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lASfs-0002DA-4h; Fri, 12 Feb 2021 02:15:36 -0500 In-Reply-To: (message from Paul Eggert on Thu, 11 Feb 2021 18:20:44 -0800) 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:199842 Archived-At: > Cc: 46397@debbugs.gnu.org, craven@gmx.net > From: Paul Eggert > Date: Thu, 11 Feb 2021 18:20:44 -0800 > > On 2/11/21 2:14 PM, Matt Armstrong wrote: > > > The issue isn't confined to exiting Emacs. It appears that once in a > > "tricky situation where the file can't be unlocked for whatever reason" > > Emacs will refuse to kill the buffer because unlock_file() signals an > > error. > > kill-buffer already asks the user something like "Buffer XXX modified; > kill anyway? (yes or no)" when killing a buffer that's been changed > without being saved. Perhaps it should also ask "File XXX cannot be > unlocked; kill buffer anyway? (yes or no)" if the file can't be unlocked. > > > Note that shut_down_emacs() calls Fdo_auto_save() just before > > unlock_all_files() and that call succeeds. Fdo_auto_save() also calls > > report_file_errno, throwing an errno 13 (Permission denied), but that > > recovers and continues. > > Presumably shut_down_emacs should recover and continue if > unlock_all_files fails when it directly calls unlock_all_files. That all is true, but I think we should provide for recovery in a way that will work with _any_ command that calls unlock_file or unlock_all_files. Not just these two instances. See my other message about this.