Subject: bug#24184: 25.0.94; dired-copy-filename-as-kill does not quote or properly separate file names

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 15 Aug 2021 14:24:48 +0200

Drew Adams <[email-masked]> writes:

>> I think filenames should be quoted only when really necessary.  IOW,
>> only if (not (equal (shell-quote-argument "this file") "this file"))
>> but not when (equal (shell-quote-argument "this-file") "this-file").
>
> Even stronger than that.  There is no reason to suppose
> that everyone wants to yank the text only in contexts
> where it should be double-quoted.

Indeed -- we can't surmise what the user is going to use the file name
for, and in some contexts the user must quote the result (in different
ways), and in others the user doesn't.

So on reflection, I don't think there's anything we can do here that
would be useful.  We could add a new command --
`dired-copy-file-names-as-a-list-of-lisp-strings' -- but it doesn't
really sound vital.  So I'm closing this bug report.

(If somebody wants to add
`dired-copy-file-names-as-a-list-of-lisp-strings', I wouldn't oppose
that.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no