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: Tue, 09 Feb 2021 15:47:44 -0800 Message-ID: References: <87h7mllgin.fsf@nexoid.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12583"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) Cc: 46397@debbugs.gnu.org To: "Peter" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 10 00:48:35 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 1l9ckF-0003Bx-Af for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Feb 2021 00:48:35 +0100 Original-Received: from localhost ([::1]:41042 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9ckE-0001LQ-5d for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Feb 2021 18:48:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9cji-0001LK-Dk for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2021 18:48:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43522) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l9cji-00025S-6u for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2021 18:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l9cji-0000le-4F for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2021 18:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Matt Armstrong Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Feb 2021 23:48:02 +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.16129144752938 (code B ref 46397); Tue, 09 Feb 2021 23:48:02 +0000 Original-Received: (at 46397) by debbugs.gnu.org; 9 Feb 2021 23:47:55 +0000 Original-Received: from localhost ([127.0.0.1]:55068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9cjb-0000lK-FQ for submit@debbugs.gnu.org; Tue, 09 Feb 2021 18:47:55 -0500 Original-Received: from mail-pg1-f179.google.com ([209.85.215.179]:32800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9cjY-0000l6-OH for 46397@debbugs.gnu.org; Tue, 09 Feb 2021 18:47:54 -0500 Original-Received: by mail-pg1-f179.google.com with SMTP id e7so34220pge.0 for <46397@debbugs.gnu.org>; Tue, 09 Feb 2021 15:47:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Z7Krv5J/GhP1Rp/2pxfIhUuVI7W7JcTNzeD80OGQaJo=; b=lKowd+0ZU6EJOTJpBJrJ9CEDpV8n6XHQeGZ3wRj7gj887YobPOq+MiZFYkO1uAIrqI uPRBh775vWgO2OB5Bqm61NwSY3DalDT1SUJq2UBR5AokOxRLgDJC0pZjoXiJWPmAYxs/ uzQGYwH+H0SA8cKrz4o9AZXDvTRh9pWCMWPSdsRfZg/vGqpTOcJ1fjOD7vQzmp2L6ioL rJuQTy9n6Ftgea3wPd/OmkcH1nXJD3Q3jwal7f7CUuCX5PRG130WqXFs2n08KrLDnVKE C9A/qpVz7W/WDnu8U3MlScck1Vi/yautnl727jT4FUvuqEO2WRX4zckWt6NBQvgG0uqt uUQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=Z7Krv5J/GhP1Rp/2pxfIhUuVI7W7JcTNzeD80OGQaJo=; b=NAks5dpfk7T2J2I6SXFt3pmAWLM3JzXBCw5UhHLpfjRyZD8lx7yolCLu8ixREv/n9h h97y/Np58DThKWWN/r4iqBmsD7+UhC/Zgfl58y3GYqCB7mxRvTGFDUqijp6V26uiiLkL 4nLxAQUHWDSzg+zO1s+ziaoejEyebJt0gECENnum0VZINBGlSjytIliDDRZsKyNQ2pkd upNo0K8CKISrLwjM+w/qqzGK3cfNgz+sqaMaCK0ccQObKQYclEqLGIf+k30IPUAAMITE p4AYNK5wYg5VzIGl3L3yB9DW8ukqDONDHkNvUrno6rrBOd86KecCQwi6Gda2/kCiWmCN UyRQ== X-Gm-Message-State: AOAM530GrB1cMlsHDoLYGfuLhyv+KXypqNkpO6FCSLwB53ANKdSsGMvp jeOR1DEfFtiuXSW3wX5KukF3loq31I9noA== X-Google-Smtp-Source: ABdhPJx+FWzidabI+T/eKqkGa4Wx24YB2VqOUZWu7/VIHZueVRFlh7T2hYUggAqZv9XWtcS/qfix5Q== X-Received: by 2002:a05:6a00:8d0:b029:1b6:3581:4f41 with SMTP id s16-20020a056a0008d0b02901b635814f41mr351407pfu.56.1612914466235; Tue, 09 Feb 2021 15:47:46 -0800 (PST) Original-Received: from matts-mbp-2016.lan (24-113-169-116.wavecable.com. [24.113.169.116]) by smtp.gmail.com with ESMTPSA id v19sm145675pjg.50.2021.02.09.15.47.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 15:47:45 -0800 (PST) In-Reply-To: <87h7mllgin.fsf@nexoid.at> (Peter's message of "Tue, 09 Feb 2021 10:47:12 +0100") 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:199744 Archived-At: "Peter" writes: > The following steps reproduce this: > - Make sure /tmp/tmp does not exist > - Open a buffer /tmp/tmp/foo.txt > - Make some changes to the buffer. > - Do *not* save the buffer or create the directory /tmp/tmp/ > - Create /tmp/tmp as a *file* (not a directory) > - Try to kill the buffer. > > You will see the following error message: > > Unlocking file: Not a directory, /tmp/tmp/foo.txt > > I just want to kill the buffer, I don't want to save it. > > This is easily rectified by just deleting / moving away /tmp/tmp, but it > seems like this could be resolved to just delete the buffer. I confirmed this in 27.1 and the master branch. I also found it difficult to exit Emacs once this state was reached. If you choose "no" when saving modified buffers Emacs hits this error and is left in a strange state (there are no displayed buffers or mode line, but Emacs is still running). The backtrace is unsurprising: Debugger entered--Lisp error: (file-error "Unlocking file" "Not a directory" "/private/tmp/tmp/test.txt") kill-buffer("test.txt") funcall-interactively(kill-buffer "test.txt") call-interactively(kill-buffer nil nil) command-execute(kill-buffer)