* bug#37228: [PATCH] tramp: dired for files which name contains spaces
@ 2019-08-30 5:28 Koichi Arakawa
[not found] ` <87tv9y50ad.fsf@gmx.de>
0 siblings, 1 reply; 2+ messages in thread
From: Koichi Arakawa @ 2019-08-30 5:28 UTC (permalink / raw)
To: 37228
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#37228: [PATCH] tramp: dired for files which name contains spaces
[not found] ` <87tv9y50ad.fsf@gmx.de>
@ 2019-09-01 22:02 ` Koichi Arakawa
0 siblings, 0 replies; 2+ messages in thread
From: Koichi Arakawa @ 2019-09-01 22:02 UTC (permalink / raw)
To: michael.albinus; +Cc: 37228
Michael Albinus <michael.albinus@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-01 22:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-30 5:28 bug#37228: [PATCH] tramp: dired for files which name contains spaces Koichi Arakawa
[not found] ` <87tv9y50ad.fsf@gmx.de>
2019-09-01 22:02 ` Koichi Arakawa
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.