[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111856: * net/tramp.el (tramp-tramp-
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111856: * net/tramp.el (tramp-tramp-file-p): Fix docstring. |
Date: |
Fri, 22 Feb 2013 15:05:38 +0100 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111856
committer: Michael Albinus <address@hidden
branch nick: trunk
timestamp: Fri 2013-02-22 15:05:38 +0100
message:
* net/tramp.el (tramp-tramp-file-p): Fix docstring.
* net/tramp-sh.el (tramp-sh-handle-insert-directory): Handle
multibyte file names.
modified:
lisp/ChangeLog
lisp/net/tramp-sh.el
lisp/net/tramp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-02-22 02:01:32 +0000
+++ b/lisp/ChangeLog 2013-02-22 14:05:38 +0000
@@ -1,3 +1,10 @@
+2013-02-22 Michael Albinus <address@hidden>
+
+ * net/tramp.el (tramp-tramp-file-p): Fix docstring.
+
+ * net/tramp-sh.el (tramp-sh-handle-insert-directory): Handle
+ multibyte file names.
+
2013-02-22 Glenn Morris <address@hidden>
* textmodes/sgml-mode.el (sgml-xml-mode): Move before use.
=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el 2013-02-21 13:36:16 +0000
+++ b/lisp/net/tramp-sh.el 2013-02-22 14:05:38 +0000
@@ -2606,10 +2606,13 @@
(if full-directory-p "yes" "no"))
;; 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
+ ;; LC_CTYPE=''".
(if full-directory-p
(tramp-send-command
v
- (format "%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
@@ -2625,7 +2628,7 @@
(tramp-run-real-handler 'file-name-directory (list localname))))
(tramp-send-command
v
- (format "%s %s %s"
+ (format "env LC_ALL=en_US.UTF8 LC_CTYPE='' %s %s %s"
(tramp-get-ls-command v)
switches
(if (or wildcard
@@ -2671,6 +2674,11 @@
(while (re-search-forward tramp-color-escape-sequence-regexp nil t)
(replace-match "")))
+ ;; Decode the output, it could be multibyte.
+ (decode-coding-region
+ beg (point-max)
+ (or file-name-coding-system default-file-name-coding-system))
+
;; The inserted file could be from somewhere else.
(when (and (not wildcard) (not full-directory-p))
(goto-char (point-max))
=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2013-02-21 16:56:49 +0000
+++ b/lisp/net/tramp.el 2013-02-22 14:05:38 +0000
@@ -1166,11 +1166,9 @@
;;;###tramp-autoload
(defun tramp-tramp-file-p (name)
- "Return t if NAME is a string with Tramp file name syntax.
-It checks also, whether NAME is unibyte encoded."
+ "Return t if NAME is a string with Tramp file name syntax."
(save-match-data
(and (stringp name)
-; (string-equal name (string-as-unibyte name))
(string-match tramp-file-name-regexp name))))
(defun tramp-find-method (method user host)
@@ -1354,7 +1352,7 @@
(get-buffer-create (tramp-debug-buffer-name vec))
(when (bobp)
(setq buffer-undo-list t)
- ;; So it does not get loaded while outline-regexp is let-bound.
+ ;; So it does not get loaded while `outline-regexp' is let-bound.
(require 'outline)
;; Activate `outline-mode'. This runs `text-mode-hook' and
;; `outline-mode-hook'. We must prevent that local processes
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111856: * net/tramp.el (tramp-tramp-file-p): Fix docstring.,
Michael Albinus <=