]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp.el (tramp-maybe-open-connection): Set $LC_ALL to "C".
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 30 Oct 2007 20:27:22 +0000 (20:27 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Tue, 30 Oct 2007 20:27:22 +0000 (20:27 +0000)
* net/tramp-cache.el (tramp-flush-file-function): Check also
`default-directory' if `buffer-file-name' does not return a
string.  Added to `eshell-pre-command-hook'.

lisp/ChangeLog
lisp/net/tramp-cache.el
lisp/net/tramp.el

index 26a166c3489ef81c2bf0b6628ed0cbc39a6e0feb..125ae99ba06660c2cf98e76284ac5fe1bcfbbec7 100644 (file)
@@ -1,3 +1,11 @@
+2007-10-30  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp.el (tramp-maybe-open-connection): Set $LC_ALL to "C".
+
+       * net/tramp-cache.el (tramp-flush-file-function): Check also
+       `default-directory' if `buffer-file-name' does not return a
+       string.  Added to `eshell-pre-command-hook'.
+
 2007-10-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * doc-view.el (doc-view-current-doc): Remove.
index 35147e7907cfe93d80a99d22fd558a007892c24c..fcf7685e91b414f99fa3a0869d27baca9e934ff8 100644 (file)
@@ -159,21 +159,28 @@ Remove also properties of all files in subdirectories."
       result)))
 
 ;; Reverting or killing a buffer should also flush file properties.
-;; They could have been changed outside Tramp.
+;; They could have been changed outside Tramp.  In eshell, "ls" would
+;; not show proper directory contents when a file has been copied or
+;; deleted before.
 (defun tramp-flush-file-function ()
   "Flush all Tramp cache properties from buffer-file-name."
-  (let ((bfn (buffer-file-name)))
-    (when (and (stringp bfn) (tramp-tramp-file-p bfn))
+  (let ((bfn (if (stringp (buffer-file-name))
+                (buffer-file-name)
+              default-directory)))
+    (when (tramp-tramp-file-p bfn)
       (let* ((v (tramp-dissect-file-name bfn))
             (localname (tramp-file-name-localname v)))
        (tramp-flush-file-property v localname)))))
 
 (add-hook 'before-revert-hook 'tramp-flush-file-function)
+(add-hook 'eshell-pre-command-hook 'tramp-flush-file-function)
 (add-hook 'kill-buffer-hook 'tramp-flush-file-function)
 (add-hook 'tramp-cache-unload-hook
          '(lambda ()
             (remove-hook 'before-revert-hook
                          'tramp-flush-file-function)
+            (remove-hook 'eshell-pre-command-hook
+                         'tramp-flush-file-function)
             (remove-hook 'kill-buffer-hook
                          'tramp-flush-file-function)))
 
index 4886c1917aa4a0c563da6cb8693c9b60f62704a9..6008a591e685900a8bafd0bb91d57a088c86862c 100644 (file)
@@ -6066,6 +6066,7 @@ connection if a previous connection has died for some reason."
       (when (and p (processp p))
        (delete-process p))
       (setenv "TERM" tramp-terminal-type)
+      (setenv "LC_ALL" "C")
       (setenv "PROMPT_COMMAND")
       (setenv "PS1" "$ ")
       (let* ((target-alist (tramp-compute-multi-hops vec))