Commit 8ac08792 authored by Michael Albinus's avatar Michael Albinus

Sync with Tramp upstream.

* net/tramp-cache.el (tramp-dump-connection-properties):
Use `with-temp-file'.

* net/tramp-sh.el (tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes): Escape apostrophs in
file names.
(tramp-do-file-attributes-with-stat): Quote file name.
(tramp-sh-handle-directory-files-and-attributes): Fall back to
`tramp-handle-directory-files-and-attributes' in case of problems.
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-sh-handle-file-name-all-completions)
(tramp-sh-handle-delete-directory)
(tramp-sh-handle-expand-file-name, tramp-sh-handle-process-file):
Normalize use of "cd".
(tramp-do-directory-files-and-attributes-with-stat): Use the
`quoting-style' arg of `ls' if possible.  Make it also working for
file names with apostrophs.
(tramp-sh-handle-file-name-all-completions): Use arguments of `ls'
in proper order.
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-sh-handle-file-local-copy): Use `with-temp-file'.
(tramp-get-remote-locale): Accept also \r in output.
(tramp-get-ls-command-with-quoting-style): New defun.
(tramp-get-inline-coding): Set `default-directory' to a local
directory.  Sporadically, `call-process-region' does not handle a
remote default directory properly.

* net/tramp.el (tramp): Add :link property.
(tramp-login-prompt-regexp): Allow also "user", as required by
Fritz!Box telnet.
(tramp-autoload-file-name-handler): Use "/".
(tramp-handle-unhandled-file-name-directory): Return nil when
required by the spec.

* net/trampver.el: Update release number.
parent 5d9b1e10
2015-03-04 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp): Add :link property.
(tramp-login-prompt-regexp): Allow also "user", as required by
Fritz!Box telnet.
(tramp-autoload-file-name-handler): Use "/".
(tramp-handle-unhandled-file-name-directory): Return nil when
required by the spec.
* net/tramp-cache.el (tramp-dump-connection-properties):
Use `with-temp-file'.
* net/tramp-sh.el (tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes): Escape apostrophs in
file names.
(tramp-do-file-attributes-with-stat): Quote file name.
(tramp-sh-handle-directory-files-and-attributes): Fall back to
`tramp-handle-directory-files-and-attributes' in case of problems.
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-sh-handle-file-name-all-completions)
(tramp-sh-handle-delete-directory)
(tramp-sh-handle-expand-file-name, tramp-sh-handle-process-file):
Normalize use of "cd".
(tramp-do-directory-files-and-attributes-with-stat): Use the
`quoting-style' arg of `ls' if possible. Make it also working for
file names with apostrophs.
(tramp-sh-handle-file-name-all-completions): Use arguments of `ls'
in proper order.
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-sh-handle-file-local-copy): Use `with-temp-file'.
(tramp-get-remote-locale): Accept also \r in output.
(tramp-get-ls-command-with-quoting-style): New defun.
(tramp-get-inline-coding): Set `default-directory' to a local
directory. Sporadically, `call-process-region' does not handle a
remote default directory properly.
* net/trampver.el: Update release number.
2015-03-03 Agustín Martín Domingo <agustin6martin@gmail.com>
* textmodes/ispell.el (ispell-aspell-find-dictionary): Make sure
......
......@@ -362,7 +362,7 @@ KEY identifies the connection, it is either a process or a vector."
(remhash key cache)))
cache)
;; Dump it.
(with-temp-buffer
(with-temp-file tramp-persistency-file-name
(insert
";; -*- emacs-lisp -*-"
;; `time-stamp-string' might not exist in all (X)Emacs flavors.
......@@ -376,9 +376,7 @@ KEY identifies the connection, it is either a process or a vector."
";; Tramp connection history. Don't change this file.\n"
";; You can delete it, forcing Tramp to reapply the checks.\n\n"
(with-output-to-string
(pp (read (format "(%s)" (tramp-cache-print cache))))))
(write-region
(point-min) (point-max) tramp-persistency-file-name))))))
(pp (read (format "(%s)" (tramp-cache-print cache)))))))))))
(unless noninteractive
(add-hook 'kill-emacs-hook 'tramp-dump-connection-properties))
......
This diff is collapsed.
......@@ -73,6 +73,7 @@
"Edit remote files with a combination of ssh, scp, etc."
:group 'files
:group 'comm
:link '(custom-manual "(tramp)Top")
:version "22.1")
;; Maybe we need once a real Tramp mode, with key bindings etc.
......@@ -557,7 +558,7 @@ if you need to change this."
:type 'string)
(defcustom tramp-login-prompt-regexp
".*ogin\\( .*\\)?: *"
".*\\(user\\|login\\)\\( .*\\)?: *"
"Regexp matching login-like prompts.
The regexp should match at end of buffer.
......@@ -2263,7 +2264,7 @@ Falls back to normal file name handler if no Tramp file name handler exists."
"Load Tramp file name handler, and perform OPERATION."
;; Avoid recursive loading of tramp.el. `temporary-file-directory'
;; does not exist in XEmacs, so we must use something else.
(let ((default-directory (or (symbol-value 'temporary-file-directory) "/")))
(let ((default-directory "/"))
(load "tramp" nil t))
(apply operation args)))
......@@ -3352,10 +3353,11 @@ User is always nil."
(defun tramp-handle-unhandled-file-name-directory (_filename)
"Like `unhandled-file-name-directory' for Tramp files."
;; With Emacs 23, we could simply return `nil'. But we must keep it
;; for backward compatibility. "~/" cannot be returned, because
;; there might be machines without a HOME directory (like hydra).
"/")
;; Starting with Emacs 23, we must simply return `nil'. But we must
;; keep backward compatibility, also with XEmacs. "~/" cannot be
;; returned, because there might be machines without a HOME
;; directory (like hydra).
(and (< emacs-major-version 23) "/"))
(defun tramp-handle-set-visited-file-modtime (&optional time-list)
"Like `set-visited-file-modtime' for Tramp files."
......
......@@ -31,7 +31,7 @@
;; should be changed only there.
;;;###tramp-autoload
(defconst tramp-version "2.2.11-24.5"
(defconst tramp-version "2.2.12-pre"
"This version of Tramp.")
;;;###tramp-autoload
......@@ -44,7 +44,7 @@
(= emacs-major-version 21)
(>= emacs-minor-version 4)))
"ok"
(format "Tramp 2.2.11-24.5 is not fit for %s"
(format "Tramp 2.2.12-pre is not fit for %s"
(when (string-match "^.*$" (emacs-version))
(match-string 0 (emacs-version)))))))
(unless (string-match "\\`ok\\'" x) (error "%s" x)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment