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:46:27 -0800 Message-ID: References: <83sg5r276b.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28903"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46397@debbugs.gnu.org, eggert@cs.ucla.edu, craven@gmx.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 19 22:47:28 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 1lDDcV-0007O6-4N for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Feb 2021 22:47:27 +0100 Original-Received: from localhost ([::1]:56578 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDDcT-0006VY-Rv for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Feb 2021 16:47:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDDc6-0006VP-0f for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2021 16:47:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39001) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lDDc5-0007ow-Px for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2021 16:47:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lDDc5-0007X8-NU for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2021 16:47: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:47: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.161377120228932 (code B ref 46397); Fri, 19 Feb 2021 21:47:01 +0000 Original-Received: (at 46397) by debbugs.gnu.org; 19 Feb 2021 21:46:42 +0000 Original-Received: from localhost ([127.0.0.1]:50547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lDDbl-0007WZ-PR for submit@debbugs.gnu.org; Fri, 19 Feb 2021 16:46:42 -0500 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:57683) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lDDbj-0007WF-4Z for 46397@debbugs.gnu.org; Fri, 19 Feb 2021 16:46:39 -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 relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 254FCC0003; Fri, 19 Feb 2021 21:46:30 +0000 (UTC) In-Reply-To: <83sg5r276b.fsf@gnu.org> 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:200385 Archived-At: Eli Zaretskii writes: >> From: Matt Armstrong >> Cc: 46397@debbugs.gnu.org, eggert@cs.ucla.edu, craven@gmx.net >> Date: Fri, 19 Feb 2021 11:10:45 -0800 >> >> I'm coming to the opinion that issuing a prompt from `unlock-buffer' >> itself is a bad idea, but I think prompting from `kill-buffer' is >> okay. > > What do you propose to do for all the other users of unlock-buffer? They continue to signal errors. I would be happy to send a list of reasons why I think this is a safer thing to do than prompting. (reasons that I admit I could be misguided) >> I could write a whole essay about why, but instead I'll just >> propose the following and ask for your thoughts: >> >> (a) Modify `kill-buffer' to call `unlock-buffer' sooner, closer to the >> point where it is already running hooks prompting the user. > > Why do we need to move the call? Can we leave it in its current > place, and thus minimize potential unintended problems this could > cause? In part because `kill-buffer' currently calls `unlock-buffer' after this comment: /* We have no more questions to ask. Verify that it is valid to kill the buffer. This must be done after the questions since anything can happen within do_yes_or_no_p. */ (This class of problem is also one of the reasons for my answer above.)