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: PR: dired-do-create-files now checks for trailing slashes in the target Date: Tue, 09 Nov 2021 15:47:03 +0200 Message-ID: <837ddh5tm0.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> <87fstn2ydc.fsf@gnu.org> <87bl4a7g2m.fsf@gnus.org> <87sfxmqwdr.fsf@gnu.org> <87bl4a2nng.fsf@gnus.org> <87lf3ew3k5.fsf@gnu.org> <83wnmyf3u3.fsf@gnu.org> <87h7e2vvrp.fsf@gnu.org> <83pmsqez1d.fsf@gnu.org> <87cznimxbd.fsf@gnus.org> <83pmrik2r9.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27085"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, emacs-devel@gnu.org, stefankangas@gmail.com, tsdh@gnu.org To: Rudi C Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 09 14:51:10 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 1mkRWo-0006nz-Ez for ged-emacs-devel@m.gmane-mx.org; Tue, 09 Nov 2021 14:51:10 +0100 Original-Received: from localhost ([::1]:43640 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mkRWn-0001KC-F0 for ged-emacs-devel@m.gmane-mx.org; Tue, 09 Nov 2021 08:51:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mkRT0-0006hz-7e for emacs-devel@gnu.org; Tue, 09 Nov 2021 08:47:14 -0500 Original-Received: from [2001:470:142:3::e] (port=39588 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mkRSx-0006LO-Ho; Tue, 09 Nov 2021 08:47:13 -0500 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=NLQdIGCIHJDisUyti+iIS5rqwrWhJETsq/d9F09OCqc=; b=bgDWf/tVPk75 dboy9T2dkM1PL9N9OXjKbR9boa+hmvX8BxPGi8bmAPRAG1NPkNHPaR03KJud+Lnp5Pr5pDZrW3rqS N7sZ6TwmPe+M5RzZE8JpT90s2VEkPwZHI4onW+bFpeLsc8gJPt13aRsHgA41Hj841bPNSqDrzxHWs cbUtw6Elqt9haNf9AOxbIbF8ASyBeobgvSC5n7Uym9KJvMxpEN8/QeuZJ7hYNJpAk/tK2tGHb6PKR zf8MGHzO0MMOA/RWIAsG6D8F1dQ5oticZLvVPbJYO6jvjDmOk+PyRkTeGTYqk8Zb+sryy+NEGlNDF /eeMlhTxun20bP0mVIx1Qw==; Original-Received: from [87.69.77.57] (port=2964 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mkRSw-00061W-Vx; Tue, 09 Nov 2021 08:47:11 -0500 In-Reply-To: (message from Rudi C on Tue, 9 Nov 2021 16:22:59 +0330) 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" Xref: news.gmane.io gmane.emacs.devel:279103 Archived-At: > From: Rudi C > Date: Tue, 9 Nov 2021 16:22:59 +0330 > Cc: larsi@gnus.org, tsdh@gnu.org, stefankangas@gmail.com, emacs-devel@gnu.org > > Okay, I have attached a new patch (no need for the previous patches). Thanks. > PS: I inserted newlines into the docstring to make the lines shorter, but this makes the docstring ugly to view > (as it is essentially hardwrapping based on an arbitrary column size that the user's screen will not share). No, that's not TRT. The first line of a doc string should be a complete sentence, and it should be a summary of what the variable or the function does. That's because some Help commands display only that first line to the user. See below. > +(defcustom dired-create-dirs-trailing-separator nil > + "If t, when selecting a single destination in Dired, > +paths that end in a path separator will be treated as a non-existent directory, > +and acted on according to `dired-create-destination-dirs'. Here, I'd rephrase: "If non-nil, create missing directories when copying or moving in Dired. If this variable is non-nil, and the destination of a move or a copy operation in Dired is a directory name, i.e. it ends in a slash, Dired will create the destination if it doesn't already exist, provided that `dired-create-destination-dirs' says so." Additional comments: . we don't use "path" for anything except PATH-style directory lists; the GNU Coding Standards frown on using that to mean "file name" or "directory name" . instead of "path separator" (which could be confused with the colon which separates directories in PATH), use "slash" or "directory separator" > +For example, when renaming a directory named `old_name' to `new_name/' > +(note the trailing path separator), `new_name' might be created depending on "path separator" again > +`dired-create-destination-dirs' and `old_name' will be moved into it > +if it is created; Otherwise `old_name' will be directly renamed to `new_name'." The "Otherwise" part should not be capitalized here. > + :type '(choice > + (const :tag > + "Do not treat paths with a trailing path separator specially" nil) > + (const :tag "Treat paths with a trailing path separator specially" t)) Once again, "paths" used for file names. Also, "treat specially" is a riddle: it doesn't explain the effect of the setting. I suggest the following descriptions instead: "Create missing destination directories on copy/move." "Do not create missing destination directories." OK?