[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 90fd798: Fix coding system for Tramp on OS X.
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] emacs-25 90fd798: Fix coding system for Tramp on OS X. |
Date: |
Sat, 09 Jan 2016 12:55:09 +0000 |
branch: emacs-25
commit 90fd798aacbf92a330cf43d2670479499daf3fb1
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
Fix coding system for Tramp on OS X.
* lisp/net/tramp-compat.el: Require ucs-normalize.
* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Set coding system to `utf-8-hfs' for Mac OS X.
* test/automated/tramp-tests.el (tramp-test29-vc-registered):
Flush directory properties when needed.
(tramp--test-utf8): Include Chinese file name, again.
---
lisp/net/tramp-compat.el | 2 ++
lisp/net/tramp-sh.el | 14 +++++++++-----
test/automated/tramp-tests.el | 7 +++++--
3 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index c6de183..44923ae 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -56,6 +56,8 @@
(require 'custom)
(require 'format-spec)
(require 'shell)
+ ;; Introduced in Emacs 23.2.
+ (require 'ucs-normalize nil 'noerror)
(require 'trampver)
(require 'tramp-loaddefs)
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index ca0707f..1357db0 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4214,10 +4214,8 @@ process to set up. VEC specifies the connection."
(cons 'undecided 'undecided)))
cs-decode cs-encode)
(when (symbolp cs) (setq cs (cons cs cs)))
- (setq cs-decode (car cs))
- (setq cs-encode (cdr cs))
- (unless cs-decode (setq cs-decode 'undecided))
- (unless cs-encode (setq cs-encode 'undecided))
+ (setq cs-decode (or (car cs) 'undecided)
+ cs-encode (or (cdr cs) 'undecided))
(setq cs-encode
(tramp-compat-coding-system-change-eol-conversion
cs-encode
@@ -4229,7 +4227,13 @@ process to set up. VEC specifies the connection."
(when (search-forward "\r" nil t)
(setq cs-decode (tramp-compat-coding-system-change-eol-conversion
cs-decode 'dos)))
- (tramp-compat-funcall
+ ;; Special setting for Mac OS X.
+ (when (and (string-match
+ "^Darwin" (tramp-get-connection-property vec "uname" ""))
+ (memq 'utf-8-hfs (coding-system-list)))
+ (setq cs-decode 'utf-8-hfs
+ cs-encode 'utf-8-hfs))
+ (tramp-compat-funcall
'set-buffer-process-coding-system cs-decode cs-encode)
(tramp-message
vec 5 "Setting coding system to `%s' and `%s'" cs-decode cs-encode))
diff --git a/test/automated/tramp-tests.el b/test/automated/tramp-tests.el
index 73a7294..c956f9c 100644
--- a/test/automated/tramp-tests.el
+++ b/test/automated/tramp-tests.el
@@ -1658,6 +1658,10 @@ This tests also `make-symbolic-link', `file-truename'
and `add-name-to-file'."
(vc-register
nil (list (car vc-handled-backends)
(list (file-name-nondirectory tmp-name2))))))
+ ;; vc-git uses an own process sentinel, Tramp's sentinel
+ ;; for flushing the cache isn't used.
+ (with-parsed-tramp-file-name tmp-name1 nil
+ (tramp-flush-directory-property v localname))
(should (vc-registered (file-name-nondirectory tmp-name2)))))
;; Cleanup.
@@ -2044,8 +2048,7 @@ Use the `ls' command."
(unless (tramp--test-hpux-p) "Γυρίστε το Γαλαξία με Ώτο Στοπ")
(unless (or (tramp--test-hpux-p) (tramp--test-darwin-p))
"أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية لتصفحها
بلا اتصال بالإنترنت")
- (unless (tramp--test-darwin-p)
- "银河系漫游指南系列")
+ "银河系漫游指南系列"
"Автостопом по гала́ктике")))
(ert-deftest tramp-test32-utf8 ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 90fd798: Fix coding system for Tramp on OS X.,
Michael Albinus <=