GNU bug report logs - #37228
[PATCH] tramp: dired for files which name contains spaces

Previous Next

Package: emacs;

Reported by: Koichi Arakawa <arakawa <at> pp.iij4u.or.jp>

Date: Fri, 30 Aug 2019 05:29:01 UTC

Severity: normal

Tags: patch

Fixed in version 27.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37228 in the body.
You can then email your comments to 37228 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#37228; Package emacs. (Fri, 30 Aug 2019 05:29:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Koichi Arakawa <arakawa <at> pp.iij4u.or.jp>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 30 Aug 2019 05:29:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Koichi Arakawa <arakawa <at> pp.iij4u.or.jp>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] tramp: dired for files which name contains spaces
Date: Fri, 30 Aug 2019 14:28:04 +0900
 (東京 (標準時))
Hi,

It seems for me that the current version of tramp does not handle
dired properly for files which name contains spaces.

How about using the '-0' option of xargs?

Regards,
Koichi Arakawa

--- tramp-sh.el.~1~	2019-08-28 07:24:07.781000000 +0900
+++ tramp-sh.el	2019-08-30 13:59:34.747676700 +0900
@@ -1762,8 +1762,8 @@
        ;; Apostrophes in the stat output are masked as
        ;; `tramp-stat-marker', in order to make a proper shell escape
        ;; of them in file names.
-       "cd %s && echo \"(\"; (%s %s -a | "
-       "xargs %s -c "
+       "cd %s && echo \"(\"; (%s %s -a | tr '\\n' '\\0' | "
+       "xargs -0 %s -c "
        "'(%s%%n%s (%s%%N%s) %%h %s %s %%X %%Y %%Z %%s %s%%A%s t %%i -1)' "
        "-- 2>/dev/null | sed -e 's/\"/\\\\\"/g' -e 's/%s/\"/g'); echo \")\""))
     (tramp-shell-quote-argument localname)






bug Marked as fixed in versions 27.1. Request was from Michael Albinus <michael.albinus <at> gmx.de> to control <at> debbugs.gnu.org. (Fri, 30 Aug 2019 12:10:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37228; Package emacs. (Sun, 01 Sep 2019 22:03:01 GMT) Full text and rfc822 format available.

Message #10 received at 37228 <at> debbugs.gnu.org (full text, mbox):

From: Koichi Arakawa <arakawa <at> pp.iij4u.or.jp>
To: michael.albinus <at> gmx.de
Cc: 37228 <at> debbugs.gnu.org
Subject: Re: bug#37228: [PATCH] tramp: dired for files which name contains
 spaces
Date: Mon, 02 Sep 2019 07:02:27 +0900
 (東京 (標準時))
Michael Albinus <michael.albinus <at> gmx.de> wrote:
> Thanks for this. Originally, Tramp has used a pattern like you show in
> your patch. Back in 2015, this has been changed in order to use the
> quoting-style-options of ls instead. This works so far, but not in the
> case you have shown.
> 
> Worse, tramp-tests.el didn't detect this. I've extended it a little bit,
> and now it shows this error.

Thank you for your detailed explanation.

> After applying your patch (slightly modified), the tests pass,
> again. I've committed everything to master, could you, pls check?

I have confirmed that it works properly.

> Best regards, Michael.

Best regards,
Koichi Arakawa





bug marked as fixed in version 27.1, send any further explanations to 37228 <at> debbugs.gnu.org and Koichi Arakawa <arakawa <at> pp.iij4u.or.jp> Request was from Michael Albinus <michael.albinus <at> gmx.de> to control <at> debbugs.gnu.org. (Mon, 02 Sep 2019 19:11:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 01 Oct 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 180 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.