From 58bd4aa21a6847c0d32cac42ce3085082ef8bcb3 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 26 Feb 2013 09:46:38 +0100 Subject: [PATCH] * net/tramp-sh.el (tramp-sh-handle-insert-directory): Add "2>/dev/null" to the ls command, in case "en_US.utf8" is not defined. POSIX environments fall back to the "C" locale then and emit a warning, which shall be suppressed. --- lisp/ChangeLog | 7 +++++++ lisp/net/tramp-sh.el | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 72a7d11eaa2..c5a902d6442 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2013-02-26 Michael Albinus + + * net/tramp-sh.el (tramp-sh-handle-insert-directory): Add + "2>/dev/null" to the ls command, in case "en_US.utf8" is not + defined. POSIX environments fall back to the "C" locale then and + emit a warning, which shall be suppressed. + 2013-02-26 Stefan Monnier * emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Tweak logic. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index e63acb6b40e..e2aaafb38dd 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -2593,12 +2593,12 @@ This is like `dired-recursive-delete-directory' for Tramp files." ;; If `full-directory-p', we just say `ls -l FILENAME'. ;; Else we chdir to the parent directory, then say `ls -ld BASENAME'. ;; "--dired" returns byte positions. Therefore, the file names - ;; must be encoded, which is guaranteed by "LC_ALL=en_US.UTF8 + ;; must be encoded, which is guaranteed by "LC_ALL=en_US.utf8 ;; LC_CTYPE=''". (if full-directory-p (tramp-send-command v - (format "env LC_ALL=en_US.UTF8 LC_CTYPE='' %s %s %s 2>/dev/null" + (format "env LC_ALL=en_US.utf8 LC_CTYPE='' %s %s %s 2>/dev/null" (tramp-get-ls-command v) switches (if wildcard @@ -2614,7 +2614,7 @@ This is like `dired-recursive-delete-directory' for Tramp files." (tramp-run-real-handler 'file-name-directory (list localname)))) (tramp-send-command v - (format "env LC_ALL=en_US.UTF8 LC_CTYPE='' %s %s %s" + (format "env LC_ALL=en_US.utf8 LC_CTYPE='' %s %s %s 2>/dev/null" (tramp-get-ls-command v) switches (if (or wildcard -- 2.39.2