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: Wed, 17 Mar 2021 16:36:24 -0700 Message-ID: <87sg4t1hfr.fsf@rfc20.org> References: <16051.1613951017@alto> <2702033.1615745013@olgas.newt.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23013"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eggert@cs.ucla.edu, 46397@debbugs.gnu.org, craven@gmx.net, Mike Kupfer To: Bill Wohler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 18 00:39:12 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 1lMfkt-0005rE-Cm for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Mar 2021 00:39:11 +0100 Original-Received: from localhost ([::1]:46724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMfks-0000zv-8t for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 Mar 2021 19:39:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMfio-0007zD-9W for bug-gnu-emacs@gnu.org; Wed, 17 Mar 2021 19:37:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:32867) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lMfio-0003ZL-1O for bug-gnu-emacs@gnu.org; Wed, 17 Mar 2021 19:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lMfin-0001a8-UB for bug-gnu-emacs@gnu.org; Wed, 17 Mar 2021 19:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Matt Armstrong Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Mar 2021 23:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46397 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 46397-submit@debbugs.gnu.org id=B46397.16160242026041 (code B ref 46397); Wed, 17 Mar 2021 23:37:01 +0000 Original-Received: (at 46397) by debbugs.gnu.org; 17 Mar 2021 23:36:42 +0000 Original-Received: from localhost ([127.0.0.1]:44413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMfiT-0001ZK-Kj for submit@debbugs.gnu.org; Wed, 17 Mar 2021 19:36:41 -0400 Original-Received: from relay11.mail.gandi.net ([217.70.178.231]:46037) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMfiP-0001Z2-DR for 46397@debbugs.gnu.org; Wed, 17 Mar 2021 19:36:39 -0400 Original-Received: from mdeb (24-113-169-116.wavecable.com [24.113.169.116]) (Authenticated sender: matt@rfc20.org) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 9108E100002; Wed, 17 Mar 2021 23:36:28 +0000 (UTC) Original-Received: from matt by mdeb with local (Exim 4.94) (envelope-from ) id 1lMfiC-0009pO-A4; Wed, 17 Mar 2021 16:36:24 -0700 In-Reply-To: <2702033.1615745013@olgas.newt.com> 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:202541 Archived-At: Bill Wohler writes: > Matt Armstrong wrote: > >> Mike Kupfer writes: >> >> > I'm not sure I completely understanding the logic behind those calls to >> > unlock-buffer, but I'll take a stab at it. >> >> [...] >> >> Thanks for those analysis Mike. They make sense to me. > > This code was likely originally written in the 80s and well before my > time in any case, and it isn't code that I've worked with. I concur with > Mike's analysis as well, and thank him for diving in. Yes, it looked like old code to me as well. I suspect that the explicit `unlock-buffer' call could be eliminated by rewriting this code with the primitives Emacs provides now. E.g. a call to `(set-buffer-modified-p nil)' would call `unlock-buffer' implicitly, if necessary, and might more clearly convey the problem the original author was trying to solve. In any case, I don't intend to pursue this further. > Since I'm reading this out of context, I don't understand it :-). I > think that if an MH-E user, including me, got the prompt that Mike > suggested, she would be pretty confused. If the issue at hand arises, it > would be preferable to speak in the MH-E user's language, such as: Error > recycling draft buffer, discard or keep? [keep]. The currently proposed solution is to demote file level errors from `unlock-error' to warnings. I suspect that Emacs had no standard way to display warnings in the 80s either!