From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#24184: 25.0.94; dired-copy-filename-as-kill does not quote or properly separate file names Date: Mon, 16 Apr 2018 23:40:39 +0300 Organization: LINKOV.NET Message-ID: <874lka51h4.fsf@mail.linkov.net> References: <87a7u45ahp.fsf@mouse.gnus.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1523916997 32612 195.159.176.226 (16 Apr 2018 22:16:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 16 Apr 2018 22:16:37 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: Gereon Kaiping , 24184@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 17 00:16:33 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f8CQK-0008OX-HH for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Apr 2018 00:16:32 +0200 Original-Received: from localhost ([::1]:47943 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8CSR-0007BZ-5e for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Apr 2018 18:18:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8CRq-0006qc-A4 for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2018 18:18:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f8CRn-00055w-Kc for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2018 18:18:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48486) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f8CRn-00055B-G0 for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2018 18:18:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f8CRm-0000GV-4O for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2018 18:18:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Apr 2018 22:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24184 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24184-submit@debbugs.gnu.org id=B24184.15239170781010 (code B ref 24184); Mon, 16 Apr 2018 22:18:02 +0000 Original-Received: (at 24184) by debbugs.gnu.org; 16 Apr 2018 22:17:58 +0000 Original-Received: from localhost ([127.0.0.1]:56383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f8CRh-0000GC-0r for submit@debbugs.gnu.org; Mon, 16 Apr 2018 18:17:58 -0400 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:37611 helo=homiemail-a23.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f8CRf-0000G3-7d for 24184@debbugs.gnu.org; Mon, 16 Apr 2018 18:17:55 -0400 Original-Received: from homiemail-a23.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a23.g.dreamhost.com (Postfix) with ESMTP id 76A584B0063; Mon, 16 Apr 2018 15:17:54 -0700 (PDT) Original-Received: from localhost.linkov.net (m91-129-110-22.cust.tele2.ee [91.129.110.22]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a23.g.dreamhost.com (Postfix) with ESMTPSA id 5954A4B0062; Mon, 16 Apr 2018 15:17:53 -0700 (PDT) In-Reply-To: <87a7u45ahp.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Mon, 16 Apr 2018 01:13:38 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:145467 Archived-At: >> $ touch "this file" "that file" >> $ emacs -Q >> C-x C-f RET m m w >> >> gives >> >> that file this file >> >> but should give something like >> >> "that file" "this file" >> >> or >> >> that file >> this file >> >> to be much more useful. The former looks cleanest, because then the >> content can be yanked as elisp list, but would of course require that >> not only filenames are quoted, but that also " be quoted inside file >> names. > > Hm... I guess that depends on what the purpose of the copy-as-kill is. > In the single file case, we probably don't want to quote "this file" > because then we can't use that to yank it into the file prompt, for > instance. > > But in the several-file case, we can't use it for that anyway, and then > quoting these file names is probably better than not. 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").