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.devel Subject: Re: PR: dired-do-create-files now checks for trailing slashes in the target Date: Wed, 29 Sep 2021 17:17:35 +0200 Message-ID: <87fstn2ydc.fsf@gnu.org> References: <831r58k0cx.fsf@gnu.org> <87tui4qyni.fsf@gnu.org> <83tui4iift.fsf@gnu.org> <874ka43rp1.fsf@gnu.org> <83ee97il43.fsf@gnu.org> <87zgrv33mf.fsf@gnu.org> <838rzfijnj.fsf@gnu.org> <87r1d73312.fsf@gnu.org> <837deziiwz.fsf@gnu.org> <87ee97bgxt.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="3603"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.0; emacs 28.0.50 Cc: Lars Ingebrigtsen , emacs-devel@gnu.org, Eli Zaretskii , rudiwillalwaysloveyou@gmail.com To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 29 17:37:32 2021 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 1mVbeG-0000oN-I0 for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Sep 2021 17:37:32 +0200 Original-Received: from localhost ([::1]:45802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVbeF-0001T7-Cw for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Sep 2021 11:37:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49624) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVbXr-0001vB-8l for emacs-devel@gnu.org; Wed, 29 Sep 2021 11:30:57 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33076) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVbXn-0005Cu-PZ; Wed, 29 Sep 2021 11:30:54 -0400 Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:33799) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVbX8-0006Ks-KQ; Wed, 29 Sep 2021 11:30:49 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id 1B43D27C0054; Wed, 29 Sep 2021 11:30:10 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 29 Sep 2021 11:30:10 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudekvddgkeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfhgfhffvufffjgfkgggtsehttdertddtredtnecuhfhrohhmpefvrghsshhi lhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnhepve evieekteekveeigfefffeivdetgeduvdffueeuudevgedttdehvdfhueevfffhnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnhdomh gvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeehvdel kedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 29 Sep 2021 11:30:08 -0400 (EDT) In-reply-to: X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:275807 Archived-At: Stefan Kangas writes: >> But it's nice functionality. Is there some other way we could get >> this without relying on the difference between foo and foo/? A >> separate command, perhaps? Or some extra prompting? Lars, note that we are not talking about a specific command like `dired-do-rename'. The change is to `dired-do-create-files' which is a workhorse for many dired commands that need some target directory or file, e.g., renaming/moving, copying, symlinking, etc. > How about a prompt by default (e.g. "Do you want to create directory > `foo' and move the file into it?"), with a user option to disable it > for those that want it? There already is `dired-create-destination-dirs'. Only if that is non-nil, Rudi's patch has an effect. And if it is 'ask, you'll be prompted if foo/ should be created already. Of course, it won't explain the "move the marked/current file(s) into it" part. (Note that while we are talking about just a single source file, it could be many.) We could also let-bind `dired-create-destination-dirs' around the one specific place Rudi touched so that it gets a special value 'ask-because-of-trailing-slash-in-target if it's non-nil already which would allow `dired-maybe-create-dirs' to issue a more explanatory message. But then again, this could also happen with copying or symlinking, so that message couldn't really say "move into" without moving more context into down to `dired-maybe-create-dirs' so that it can distinguish "move into" from "create a new symlink into" or what else. Bye, Tassilo