all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Rudi C <rudiwillalwaysloveyou@gmail.com>
Cc: larsi@gnus.org, emacs-devel@gnu.org, stefankangas@gmail.com,
	tsdh@gnu.org
Subject: Re: PR: dired-do-create-files now checks for trailing slashes in the target
Date: Tue, 09 Nov 2021 15:47:03 +0200	[thread overview]
Message-ID: <837ddh5tm0.fsf@gnu.org> (raw)
In-Reply-To: <CAE9z9A1tvh=VAcSz-A5KA0eVH0aRvfbc5eswPzwhRmi=8sEiUQ@mail.gmail.com> (message from Rudi C on Tue, 9 Nov 2021 16:22:59 +0330)

> From: Rudi C <rudiwillalwaysloveyou@gmail.com>
> 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?



  reply	other threads:[~2021-11-09 13:47 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28 17:50 PR: dired-do-create-files now checks for trailing slashes in the target Rudi C
2021-09-28 18:17 ` Stefan Kangas
2021-09-28 18:42   ` Rudi C
2021-09-28 19:03     ` Stefan Kangas
2021-09-28 19:38       ` Tassilo Horn
2021-09-28 20:07         ` Stefan Kangas
2021-09-28 20:23       ` Rudi C
2021-09-28 18:42   ` Eli Zaretskii
2021-09-28 19:29     ` Tassilo Horn
2021-09-28 19:55       ` Eli Zaretskii
2021-09-29  4:46         ` Tassilo Horn
2021-09-29 13:09           ` Eli Zaretskii
2021-09-29 13:20             ` Rudi C
2021-09-29 13:34               ` Eli Zaretskii
2021-09-29 13:37               ` Tassilo Horn
2021-09-29 13:42               ` Stefan Kangas
2021-09-29 13:53                 ` Tassilo Horn
2021-09-29 14:31                   ` Rudi C
2021-09-29 13:23             ` Tassilo Horn
2021-09-29 13:41               ` Eli Zaretskii
2021-09-29 13:42                 ` Tassilo Horn
2021-09-29 13:57                   ` Eli Zaretskii
2021-09-29 14:21                     ` Lars Ingebrigtsen
2021-09-29 15:04                       ` Stefan Kangas
2021-09-29 15:17                         ` Tassilo Horn
2021-09-30  6:06                           ` Lars Ingebrigtsen
2021-09-30  7:29                             ` Lars Ingebrigtsen
2021-09-30  8:32                             ` Tassilo Horn
2021-09-30 13:33                               ` Lars Ingebrigtsen
2021-09-30 14:10                                 ` Tassilo Horn
2021-09-30 16:03                                   ` Eli Zaretskii
2021-09-30 16:48                                     ` Tassilo Horn
2021-09-30 17:47                                       ` Eli Zaretskii
2021-09-30 18:52                                         ` Rudi C
2021-09-30 19:02                                           ` Eli Zaretskii
2021-11-01 15:37                                         ` Rudi C
2021-11-02 14:44                                           ` Lars Ingebrigtsen
2021-11-02 15:08                                             ` Rudi C
2021-11-02 15:15                                               ` Eli Zaretskii
2021-11-09 12:52                                                 ` Rudi C
2021-11-09 13:47                                                   ` Eli Zaretskii [this message]
2021-12-05 12:12                                                   ` Tassilo Horn
2021-12-05 13:26                                                     ` Rudi C
2021-12-05 17:00                                                       ` Tassilo Horn
2021-12-06  4:34                                                       ` Richard Stallman
2021-12-05 20:24                                                     ` Lars Ingebrigtsen
2021-12-06  6:01                                                       ` Tassilo Horn
2021-09-30 15:45                               ` [External] : " Drew Adams
2021-09-30 13:54                             ` Stefan Kangas
2021-09-30 13:59                               ` Lars Ingebrigtsen
2021-09-29 15:44                       ` Eli Zaretskii
2021-09-29 17:01                   ` [External] : " Drew Adams
2021-09-29 19:09                     ` Tassilo Horn
2021-09-29 19:35                       ` Drew Adams
2021-09-29 13:57               ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=837ddh5tm0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=rudiwillalwaysloveyou@gmail.com \
    --cc=stefankangas@gmail.com \
    --cc=tsdh@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.