Mercurial > emacs
changeset 85802:a69014d11d95
* 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'.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Tue, 30 Oct 2007 20:27:22 +0000 |
parents | 9b97166d0c6c |
children | 05d1905f2a7a |
files | lisp/ChangeLog lisp/net/tramp-cache.el lisp/net/tramp.el |
diffstat | 3 files changed, 19 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Tue Oct 30 17:45:41 2007 +0000 +++ b/lisp/ChangeLog Tue Oct 30 20:27:22 2007 +0000 @@ -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.
--- a/lisp/net/tramp-cache.el Tue Oct 30 17:45:41 2007 +0000 +++ b/lisp/net/tramp-cache.el Tue Oct 30 20:27:22 2007 +0000 @@ -159,21 +159,28 @@ 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)))
--- a/lisp/net/tramp.el Tue Oct 30 17:45:41 2007 +0000 +++ b/lisp/net/tramp.el Tue Oct 30 20:27:22 2007 +0000 @@ -6066,6 +6066,7 @@ (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))