From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.bugs Subject: bug#48301: 28.0.50; Dired asks if buffer "" should be deleted with ls flag -p Date: Tue, 11 May 2021 15:41:04 +0200 Message-ID: <87pmxxqogq.fsf@gnu.org> References: <87sg2wx4vg.fsf@gnu.org> <87h7j9o0zx.fsf@gnus.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="3534"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.5.13; emacs 28.0.50 Cc: 48301@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 11 17:35:09 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 1lgUPc-0000jF-V1 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 May 2021 17:35:08 +0200 Original-Received: from localhost ([::1]:32768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgUPb-0001z8-Jt for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 May 2021 11:35:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgUJi-0002gk-TJ for bug-gnu-emacs@gnu.org; Tue, 11 May 2021 11:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53827) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lgUJi-0005fo-AK for bug-gnu-emacs@gnu.org; Tue, 11 May 2021 11:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lgUJi-0001yx-7L for bug-gnu-emacs@gnu.org; Tue, 11 May 2021 11:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tassilo Horn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 May 2021 15:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48301 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 48301-submit@debbugs.gnu.org id=B48301.16207469297599 (code B ref 48301); Tue, 11 May 2021 15:29:02 +0000 Original-Received: (at 48301) by debbugs.gnu.org; 11 May 2021 15:28:49 +0000 Original-Received: from localhost ([127.0.0.1]:37140 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgUJV-0001yV-2L for submit@debbugs.gnu.org; Tue, 11 May 2021 11:28:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgUJT-0001yH-9J for 48301@debbugs.gnu.org; Tue, 11 May 2021 11:28:47 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52502) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgUJN-0005WC-F4; Tue, 11 May 2021 11:28:41 -0400 Original-Received: from auth1-smtp.messagingengine.com ([66.111.4.227]:51455) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgUJN-0000VB-Bx; Tue, 11 May 2021 11:28:41 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id 2365B27C0054; Tue, 11 May 2021 11:28:41 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 11 May 2021 11:28:41 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdehtddgkeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfhgfhffvufffjgfkgggtsehttdertddtredtnecuhfhrohhmpefvrghsshhi lhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnhepve evieekteekveeigfefffeivdetgeduvdffueeuudevgedttdehvdfhueevfffhnecukfhp peekjedrudeifedrfedurdduheegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepthhhohhrnhdomhgvshhmthhprghuthhhphgvrhhsohhnrghl ihhthidqkeeijeefkeejkeegqdeifeehvdelkedqthhsughhpeepghhnuhdrohhrghesfh grshhtmhgrihhlrdhfmh X-ME-Proxy: Original-Received: from thinkpad-t440p (p57a31f9a.dip0.t-ipconnect.de [87.163.31.154]) by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 11 May 2021 11:28:40 -0400 (EDT) In-reply-to: <87h7j9o0zx.fsf@gnus.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:206254 Archived-At: Lars Ingebrigtsen writes: >> 1. emacs -Q >> 2. (setq dired-listing-switches "-Alhp") ;; the -p prints dirs as foo/, >> ;; i.e., with trailing /. >> 3. M-x dired RET ~ RET >> 4. Visit directory ~/foobar in dired >> 5. Delete ~/foobar directory in dired >> 6. Dired asks: "Kill Dired buffer of , too?" where it should ask if the >> buffer of foobar should be killed. >> >> The reason is that with the -p flag to ls which prints directories with >> trailing slash, `dired-clean-up-after-deletion' is called with filename >> FN "/home/foo/foobar/" and then (file-name-nondirectory >> "/home/foo/foobar/") returns "". > > I'm unable to reproduce this bug in Emacs 28 -- I get no prompt at all > when deleting the foobar directory (when testing with "emacs -Q"). > Are there some missing steps here? Oh, I'm sorry, you are right. It seems that one needs to require dired-x, too. So here a completed/amended recipe: >> 1. emacs -Q >> 2. (setq dired-listing-switches "-Alhp") ;; the -p prints dirs as foo/, >> ;; i.e., with trailing /. 2.1 (require 'dired-x) >> 3. M-x dired RET ~ RET 3.1 Create foobar subdir using `+ foobar RET' 3.2 Refresh using `g' because only then the new foobar directory will be shown as foobar/ instead of foobar (without the trailing /). >> 4. Visit directory ~/foobar/ in dired (a new dired buffer) >> 5. Delete ~/foobar/ directory in the original dired buffer >> 6. Dired asks: "Kill Dired buffer of , too?" where it should ask if the >> buffer of foobar should be killed. Bye, Tassilo