From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bill Wohler Newsgroups: gmane.emacs.bugs Subject: bug#46397: 27.1; Cannot delete buffer pointing to a file in a path that includes a file Date: Sun, 14 Mar 2021 11:03:33 -0700 Organization: Newt Software Message-ID: <2702033.1615745013@olgas.newt.com> References: <16051.1613951017@alto> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9134"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eggert@cs.ucla.edu, 46397@debbugs.gnu.org, craven@gmx.net, Mike Kupfer To: Matt Armstrong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 14 19:20:37 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 1lLVLv-0002F3-9d for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Mar 2021 19:20:35 +0100 Original-Received: from localhost ([::1]:48198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLVLu-0002nF-6W for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Mar 2021 14:20:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLV5w-000645-NE for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2021 14:04:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50857) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lLV5u-00045q-Ng for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2021 14:04:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lLV5u-0005QL-Gg for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2021 14:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Bill Wohler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Mar 2021 18:04:02 +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.161574503320831 (code B ref 46397); Sun, 14 Mar 2021 18:04:02 +0000 Original-Received: (at 46397) by debbugs.gnu.org; 14 Mar 2021 18:03:53 +0000 Original-Received: from localhost ([127.0.0.1]:34170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLV5h-0005Pr-2f for submit@debbugs.gnu.org; Sun, 14 Mar 2021 14:03:53 -0400 Original-Received: from se1m-lax1.servconfig.com ([23.235.223.116]:59551) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLV5f-0005Pg-Am for 46397@debbugs.gnu.org; Sun, 14 Mar 2021 14:03:48 -0400 Original-Received: from ecbiz204.inmotionhosting.com ([198.46.81.33]) by se1-lax1.servconfig.com with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1lLV5U-000zKr-QB; Sun, 14 Mar 2021 14:03:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=newt.com; s=default; h=Message-ID:Date:Content-ID:Content-Type:MIME-Version:References :In-reply-to:Subject:From:cc:To:Sender:Reply-To:Content-Transfer-Encoding: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=cMzC5NuJ/yt7OddtiHP0IXQ1KbMQ6lawmflZSpJVBB8=; b=u8JWPgtR9rEJr+lRx/7MRIVhJz sh/r6XNgMHpUsbqZeRNDXXJxoqB9hKpx/vyG/AzHbtmXFe7veknEhipK+W6FEMbPSjkKLFTfjXY1z uxFVZkbrF/Fw09RZYb0j63/Boa3NrdVIDrZqfhuFbY0bsEXb79t7q1tev5s+SSpiptdCEBbu/iwXz 3p1iyRCRREtxlwApTdbInSFb7aRWPUr8j4i2yBMDZfv25r75tMXcWZ3wA6FJsYERPS4roOLiL8kob /G49TO+5Zex6mnLGscD9BzzTeSxbrY44kSAa++ggotln72VrMuMx9Pw34kWoA19Zt/Wjq/6u9BTJA l1nfWuIQ==; Original-Received: from [67.180.9.78] (port=47996 helo=olgas.newt.com) by ecbiz204.inmotionhosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lLV5R-008Sga-RG; Sun, 14 Mar 2021 14:03:34 -0400 Original-Received: by olgas.newt.com (Postfix, from userid 1000) id 1BE79380253; Sun, 14 Mar 2021 11:03:33 -0700 (PDT) In-reply-to: Comments: In-reply-to Matt Armstrong message dated "Sun, 21 Feb 2021 17:42:38 -0800." X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 28.0.50 X-Image-URL: http://www.newt.com/wohler/images/bill-diving.png Content-ID: <2702032.1615745013.1@olgas.newt.com> X-Get-Message-Sender-Via: ecbiz204.inmotionhosting.com: authenticated_id: wohler@newt.com X-Authenticated-Sender: ecbiz204.inmotionhosting.com: wohler@newt.com X-Originating-IP: 198.46.81.33 X-SpamExperts-Domain: ecbiz204.inmotionhosting.com X-SpamExperts-Username: 198.46.81.33 Authentication-Results: servconfig.com; auth=pass smtp.auth=198.46.81.33@ecbiz204.inmotionhosting.com X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.15) X-Recommended-Action: accept X-Filter-ID: Pt3MvcO5N4iKaDQ5O6lkdGlMVN6RH8bjRMzItlySaT9WLQux0N3HQm8ltz8rnu+BPUtbdvnXkggZ 3YnVId/Y5jcf0yeVQAvfjHznO7+bT5zUG+lAqVl5PQ7YcTGWJhZclBfp5bag12eqT6dgGLatBZSE BQnC99jdTTVToc4hd6JRVqk5klxtX9cOxoDXEfu0TAYUMGeFPnT9HA1HVB8cBagW7U1Fn6O4rhJC f3BrOMyb4XoqlR7M8+6IgdkAeahAZUWQf8A6S+WJUSBsH5IjXCLUB1xypqBVklFmdmXh3ed4c2NR nvSbdX7MpJcaxURZp8bhr5z1ZAdj9lJgYKDQpPPYEKlJPO8BPgzTbul+WBdoDcxpv2QHb5YCw+cs obllBcTaduYwulQTLJz9aeZvqi4YS3pOBzYZGgwOQhY3o+O/QcugnpiBmT08Aavg+yjX6ERCN/TY O8Po1sFYLrYxp44YcascUGwJuDTnOL/160LMRHLjidWGpJsLrrmbTUJr7TSyeNA/yS8xgHEcaGZS +n3XbS9w/jaua3Px00DYFQpnebAhL4b3vEDYuzMxnlzDlA5LnZjfNZCFcTIl5IOYSZ/hNLvENm8I 9LrV6SqlMuFkD6KU9Dv7KjOUcPmOBEbcnGLbR4kK40E7BolCeEB0omgwwyHfTPSi7dSZrogIGqi8 xXZ6MFKxEqSa0NtuudtlwsnwBeVXtu22cfJTcR2a0s+VB22HBXXs2v9fcvjnuflzHDeqqFz43py4 SDhdaHkWKrGC3CSqI1GKQq7TFfeGgwd/KRM1IXtP0im8eZoC1fzExeKuluZWvvZFSWagLgrBc7P5 XO0Jnbw3HLSTMPQMDFiuh21ECvT7M X-Report-Abuse-To: spam@se1-lax1.servconfig.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:202378 Archived-At: Matt Armstrong wrote: > Mike Kupfer writes: > > > (Adding Bill Wohler, who has a better grasp than I about why MH-E does > > some things.) > > > > Matt Armstrong wrote: > > > >> Eli Zaretskii writes: > >> > >> > I think we should audit all the callers of unlock_buffer and > >> > unlock_file, and see if signaling an error there is really the best > >> > alternative. > > [...] > >> * lisp/mh-e/mh-show.el (mh-clean-msg-header, mh-unvisit-file): > >> hard to say, very old code... > >> * lisp/mh-e/mh-comp.el (mh-read-draft): ditto. > > > > 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. [...] > > I don't understand the proposal for unlock-buffer (or something under > > it) to prompt the user. IIUC, the proposal is for a prompt like > > > >> /tmp/x/y lock is invalid; assume unlocked? (yes or no) > > > > I assume that if the user responds with "yes", unlock-buffer returns > > and the caller is none the wiser. If the user responds with "no", > > what happens? > > > > mike > > I think under the current idea, in the case of `kill-buffer', answering > "no" from the prompt the buffer un-killed. I think the technical > mechanism would be to either re-signal the underlying 'file-error or > signal a new 'unlock-error that contains similar information. 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]. -- Bill Wohler aka http://www.newt.com/wohler/, GnuPG ID:610BD9AD