summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2007-10-30 20:27:22 +0000
committerMichael Albinus <michael.albinus@gmx.de>2007-10-30 20:27:22 +0000
commita7580c1c8f1265e4da94603b1418e26e2cac24c4 (patch)
tree1cff0412ec8434c1e7121ca7a9f38d5ef7f32858 /lisp
parentf4c7549775c23260166c294289e6a2c61beab760 (diff)
downloademacs-a7580c1c8f1265e4da94603b1418e26e2cac24c4.tar.gz
emacs-a7580c1c8f1265e4da94603b1418e26e2cac24c4.tar.bz2
emacs-a7580c1c8f1265e4da94603b1418e26e2cac24c4.zip
* 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'.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/net/tramp-cache.el13
-rw-r--r--lisp/net/tramp.el1
3 files changed, 19 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 26a166c3489..125ae99ba06 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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.
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index 35147e7907c..fcf7685e91b 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -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)))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 4886c1917aa..6008a591e68 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -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))