From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Dired delete(d) the wrong file! Date: Sat, 06 Jul 2024 09:17:49 +0300 Message-ID: <86v81j59iq.fsf@gnu.org> References: <86r0c875s4.fsf@gnu.org> <86h6d470oh.fsf@gnu.org> <87wmlza062.fsf@web.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12074"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 06 08:18:19 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sPykU-0002wn-Un for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Jul 2024 08:18:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPyk4-0006ok-9T; Sat, 06 Jul 2024 02:17:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sPyk3-0006oD-3H for emacs-devel@gnu.org; Sat, 06 Jul 2024 02:17:51 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sPyk2-00087F-QK; Sat, 06 Jul 2024 02:17:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=n11Q1l6cCnLLeHPcRjxf3qxPexR/qbjh/0E7pj4zz6Q=; b=CBygLmE+6CDa VH8xDuPILdoOeyLONkEGGpL3d4mS0NrrCUlzp7pE1SAXImyPys5znPVu201ZmLZ3Rr9geR/SYTkV0 lVs5Q45K6ky4fwNAE/B/rgQxuSplZOz9VcyOz/Y81IirUBQTeQYFI3tfMgGsBhKchKVjQv4ry6utA 3XvWv7G70uTBdUSds2Eak4Jt+eq7b27c5SeQYQgsflqW6eNLkukURU/GlsSXwoWCKUHB+ljyP7X7w 2/2nGHd+BtWMROX2xwJr6WSghuLz0ouknDhW7gIocJHlWmcvkErwfn4Zw6aAzXrXssfbKfmPIZp4s mZlc1eGa0mdJIqxhizSCxw==; In-Reply-To: <87wmlza062.fsf@web.de> (emacs-devel@gnu.org) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:321407 Archived-At: > Date: Sat, 06 Jul 2024 01:28:37 +0200 > From: Michael Heerdegen via "Emacs development discussions." > > Eli Zaretskii writes: > > > diff --git a/lisp/files.el b/lisp/files.el > > index 042b8e2..c518273 100644 > > --- a/lisp/files.el > > +++ b/lisp/files.el > > @@ -8087,8 +8087,8 @@ insert-directory-clean > > (end (insert-directory-adj-pos > > (+ beg (read (current-buffer))) > > error-lines))) > > - (if (memq (char-after end) '(?\n ?\s)) > > - ;; End is followed by \n or by " -> ". > > + (if (memq (char-after end) '(?\n ?\s ?/ ?* ?@ ?% ?= ?|)) > > + ;; End is followed by \n or by output of -F. > > How about emitting a warning message when this condition fails? It > could help us to detect other problematic cases and warn users that > Dired needs to fall back to a heuristical parsing of ls output. I think warning is too much. After all, in the vast majority of cases the problem will be resolved by the fallback code. This discussion needed a specially-concocted file name to demonstrate a failure. But it might be good to show an echo-area message, yes. The challenge is to come up with a message text that is both specific, accurate, and clear, when the issue is subtle and potentially unknown to many users (who might well be ignorant about the --dired switch and its effects on 'ls').