From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matt Armstrong 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, 19 Feb 2021 13:52:36 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13038"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46397@debbugs.gnu.org, craven@gmx.net To: Paul Eggert , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 19 22:53:08 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 1lDDi0-0003Ib-QJ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Feb 2021 22:53:08 +0100 Original-Received: from localhost ([::1]:57238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDDhz-0008Th-Ls for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Feb 2021 16:53:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDDhu-0008TY-0D for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2021 16:53:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39005) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lDDht-00028P-Oo for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2021 16:53:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lDDht-0007fU-NH for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2021 16:53:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Matt Armstrong Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Feb 2021 21:53: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.161377157129461 (code B ref 46397); Fri, 19 Feb 2021 21:53:01 +0000 Original-Received: (at 46397) by debbugs.gnu.org; 19 Feb 2021 21:52:51 +0000 Original-Received: from localhost ([127.0.0.1]:50551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lDDhj-0007f6-IX for submit@debbugs.gnu.org; Fri, 19 Feb 2021 16:52:51 -0500 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:51727) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lDDhh-0007es-CI for 46397@debbugs.gnu.org; Fri, 19 Feb 2021 16:52:50 -0500 X-Originating-IP: 24.113.169.116 Original-Received: from matts-mbp-2016.lan (24-113-169-116.wavecable.com [24.113.169.116]) (Authenticated sender: matt@rfc20.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 04D2760003; Fri, 19 Feb 2021 21:52:39 +0000 (UTC) In-Reply-To: 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:200386 Archived-At: Paul Eggert writes: > On 2/19/21 11:10 AM, Matt Armstrong wrote: >> (a) Modify `kill-buffer' to call `unlock-buffer' sooner, closer to the >> point where it is already running hooks prompting the user. Handle >> unlock errors there by prompting. > > How would unlock-buffer's API change, so that kill-buffer and > unlock-buffer's other callers can do the right thing? Would it signal an > error, and if so which one (or a new kind of error)? unlock-buffer signals file errors today, and that wouldn't change under this idea. I suppose we could invent a new 'file-unlock-error if we think the caller may want to discriminate, but so far my prototype in `kill-buffer just handles any 'file-error that `unlock-buffer' happens to signal.