diff options
Diffstat (limited to 'lisp/net')
-rw-r--r-- | lisp/net/ange-ftp.el | 11 | ||||
-rw-r--r-- | lisp/net/browse-url.el | 28 | ||||
-rw-r--r-- | lisp/net/eudc-bob.el | 2 | ||||
-rw-r--r-- | lisp/net/eudc-export.el | 2 | ||||
-rw-r--r-- | lisp/net/eudc-hotlist.el | 2 | ||||
-rw-r--r-- | lisp/net/eudc-vars.el | 2 | ||||
-rw-r--r-- | lisp/net/eudc.el | 2 | ||||
-rw-r--r-- | lisp/net/eudcb-bbdb.el | 2 | ||||
-rw-r--r-- | lisp/net/eudcb-ldap.el | 2 | ||||
-rw-r--r-- | lisp/net/eudcb-mab.el | 1 | ||||
-rw-r--r-- | lisp/net/eudcb-ph.el | 2 | ||||
-rw-r--r-- | lisp/net/ldap.el | 2 | ||||
-rw-r--r-- | lisp/net/rcompile.el | 2 | ||||
-rw-r--r-- | lisp/net/rlogin.el | 4 | ||||
-rw-r--r-- | lisp/net/snmp-mode.el | 2 | ||||
-rw-r--r-- | lisp/net/telnet.el | 2 | ||||
-rw-r--r-- | lisp/net/tramp.el | 124 | ||||
-rw-r--r-- | lisp/net/trampver.el | 2 | ||||
-rw-r--r-- | lisp/net/webjump.el | 2 |
19 files changed, 140 insertions, 56 deletions
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index c77dbbd64b3..75c9b04a040 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -3977,7 +3977,7 @@ E.g., ange-ftp-this-dir)) (ange-ftp-real-file-name-all-completions file ange-ftp-this-dir))))) -(defun ange-ftp-file-name-completion (file dir) +(defun ange-ftp-file-name-completion (file dir &optional predicate) (let ((ange-ftp-this-dir (expand-file-name dir))) (if (ange-ftp-ftp-name ange-ftp-this-dir) (progn @@ -4005,8 +4005,13 @@ E.g., file (nconc (ange-ftp-generate-root-prefixes) (ange-ftp-real-file-name-all-completions - file ange-ftp-this-dir))) - (ange-ftp-real-file-name-completion file ange-ftp-this-dir))))) + file ange-ftp-this-dir)) + predicate) + (if predicate + (ange-ftp-real-file-name-completion + file ange-ftp-this-dir predicate) + (ange-ftp-real-file-name-completion + file ange-ftp-this-dir)))))) (defun ange-ftp-file-name-completion-1 (file tbl dir &optional predicate) diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 3f514a2aaab..33006731622 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -760,17 +760,23 @@ Prompts for a URL, defaulting to the URL at or before point. Variable (interactive (browse-url-interactive-arg "URL: ")) (unless (interactive-p) (setq args (or args (list browse-url-new-window-flag)))) - (if (functionp browse-url-browser-function) - (apply browse-url-browser-function url args) - ;; The `function' can be an alist; look down it for first match - ;; and apply the function (which might be a lambda). - (catch 'done - (dolist (bf browse-url-browser-function) - (when (string-match (car bf) url) - (apply (cdr bf) url args) - (throw 'done t))) - (error "No browse-url-browser-function matching URL %s" - url)))) + (let ((process-environment (copy-sequence process-environment))) + ;; When connected to various displays, be careful to use the display of + ;; the currently selected frame, rather than the original start display, + ;; which may not even exist any more. + (if (stringp (frame-parameter (selected-frame) 'display)) + (setenv "DISPLAY" (frame-parameter (selected-frame) 'display))) + (if (functionp browse-url-browser-function) + (apply browse-url-browser-function url args) + ;; The `function' can be an alist; look down it for first match + ;; and apply the function (which might be a lambda). + (catch 'done + (dolist (bf browse-url-browser-function) + (when (string-match (car bf) url) + (apply (cdr bf) url args) + (throw 'done t))) + (error "No browse-url-browser-function matching URL %s" + url))))) ;;;###autoload (defun browse-url-at-point (&optional arg) diff --git a/lisp/net/eudc-bob.el b/lisp/net/eudc-bob.el index c6506fddb93..7aa6279d92d 100644 --- a/lisp/net/eudc-bob.el +++ b/lisp/net/eudc-bob.el @@ -1,6 +1,6 @@ ;;; eudc-bob.el --- Binary Objects Support for EUDC -;; Copyright (C) 1999, 2000, 2002, 2003, 2004, +;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, ;; 2005, 2006 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> diff --git a/lisp/net/eudc-export.el b/lisp/net/eudc-export.el index c5f31c6b2f9..706c98df371 100644 --- a/lisp/net/eudc-export.el +++ b/lisp/net/eudc-export.el @@ -1,6 +1,6 @@ ;;; eudc-export.el --- functions to export EUDC query results -;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, ;; 2005, 2006 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> diff --git a/lisp/net/eudc-hotlist.el b/lisp/net/eudc-hotlist.el index 1e43e88dff4..84c4c2549e2 100644 --- a/lisp/net/eudc-hotlist.el +++ b/lisp/net/eudc-hotlist.el @@ -1,6 +1,6 @@ ;;; eudc-hotlist.el --- hotlist management for EUDC -;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, ;; 2005, 2006 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> diff --git a/lisp/net/eudc-vars.el b/lisp/net/eudc-vars.el index 74e3deddc06..1cf449c6f52 100644 --- a/lisp/net/eudc-vars.el +++ b/lisp/net/eudc-vars.el @@ -1,6 +1,6 @@ ;;; eudc-vars.el --- Emacs Unified Directory Client -;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, ;; 2005, 2006 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index 2d5d8f6978d..d209fc26e0a 100644 --- a/lisp/net/eudc.el +++ b/lisp/net/eudc.el @@ -1,6 +1,6 @@ ;;; eudc.el --- Emacs Unified Directory Client -;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, ;; 2005, 2006 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> diff --git a/lisp/net/eudcb-bbdb.el b/lisp/net/eudcb-bbdb.el index 0fee937758e..a4350e7c285 100644 --- a/lisp/net/eudcb-bbdb.el +++ b/lisp/net/eudcb-bbdb.el @@ -1,6 +1,6 @@ ;;; eudcb-bbdb.el --- Emacs Unified Directory Client - BBDB Backend -;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, ;; 2005, 2006 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> diff --git a/lisp/net/eudcb-ldap.el b/lisp/net/eudcb-ldap.el index 9b6a77dd2e1..e48812ec2d9 100644 --- a/lisp/net/eudcb-ldap.el +++ b/lisp/net/eudcb-ldap.el @@ -1,6 +1,6 @@ ;;; eudcb-ldap.el --- Emacs Unified Directory Client - LDAP Backend -;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, ;; 2005, 2006 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> diff --git a/lisp/net/eudcb-mab.el b/lisp/net/eudcb-mab.el index a734b90ecaf..77f9e71878f 100644 --- a/lisp/net/eudcb-mab.el +++ b/lisp/net/eudcb-mab.el @@ -3,6 +3,7 @@ ;; Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@newartisans.com> +;; Maintainer: FSF ;; Keywords: comm ;; This file is part of GNU Emacs. diff --git a/lisp/net/eudcb-ph.el b/lisp/net/eudcb-ph.el index 9edfc4870e5..44fe521b7b7 100644 --- a/lisp/net/eudcb-ph.el +++ b/lisp/net/eudcb-ph.el @@ -1,6 +1,6 @@ ;;; eudcb-ph.el --- Emacs Unified Directory Client - CCSO PH/QI Backend -;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, ;; 2005, 2006 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el index 18b96a7cce1..7f936ed0bdb 100644 --- a/lisp/net/ldap.el +++ b/lisp/net/ldap.el @@ -1,6 +1,6 @@ ;;; ldap.el --- client interface to LDAP for Emacs -;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, ;; 2005, 2006 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> diff --git a/lisp/net/rcompile.el b/lisp/net/rcompile.el index 158069986d2..b8bfdcc0166 100644 --- a/lisp/net/rcompile.el +++ b/lisp/net/rcompile.el @@ -1,6 +1,6 @@ ;;; rcompile.el --- run a compilation on a remote machine -;; Copyright (C) 1993, 1994, 2002, 2003, 2004, +;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, ;; 2005, 2006 Free Software Foundation, Inc. ;; Author: Albert <alon@milcse.rtsg.mot.com> diff --git a/lisp/net/rlogin.el b/lisp/net/rlogin.el index 74b9e034f9a..6e8b073c639 100644 --- a/lisp/net/rlogin.el +++ b/lisp/net/rlogin.el @@ -1,7 +1,7 @@ ;;; rlogin.el --- remote login interface -;; Copyright (C) 1992, 1993, 1994, 1995, 1997, 1998, 2002, 2003, 2004, -;; 2005, 2006 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1993, 1994, 1995, 1997, 1998, 2001, 2002, 2003, +;; 2004, 2005, 2006 Free Software Foundation, Inc. ;; Author: Noah Friedman ;; Maintainer: Noah Friedman <friedman@splode.com> diff --git a/lisp/net/snmp-mode.el b/lisp/net/snmp-mode.el index 62f6bb87b69..08f4659e5d9 100644 --- a/lisp/net/snmp-mode.el +++ b/lisp/net/snmp-mode.el @@ -1,6 +1,6 @@ ;;; snmp-mode.el --- SNMP & SNMPv2 MIB major mode -;; Copyright (C) 1995, 1998, 2002, 2003, 2004, +;; Copyright (C) 1995, 1998, 2001, 2002, 2003, 2004, ;; 2005, 2006 Free Software Foundation, Inc. ;; Author: Paul D. Smith <psmith@BayNetworks.com> diff --git a/lisp/net/telnet.el b/lisp/net/telnet.el index 28bc552551b..1b0c50b4322 100644 --- a/lisp/net/telnet.el +++ b/lisp/net/telnet.el @@ -1,6 +1,6 @@ ;;; telnet.el --- run a telnet session from within an Emacs buffer -;; Copyright (C) 1985, 1988, 1992, 1994, 2002, 2003, 2004, +;; Copyright (C) 1985, 1988, 1992, 1994, 2001, 2002, 2003, 2004, ;; 2005, 2006 Free Software Foundation, Inc. ;; Author: William F. Schelter diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 1ee7ca03dc5..822a995230e 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -472,6 +472,17 @@ This variable defaults to the value of `tramp-encoding-shell'." (tramp-copy-args nil) (tramp-copy-keep-date-arg nil) (tramp-password-end-of-line nil)) + ("scpc" (tramp-connection-function tramp-open-connection-rsh) + (tramp-login-program "ssh") + (tramp-copy-program "scp") + (tramp-remote-sh "/bin/sh") + (tramp-login-args ("-o" "ControlPath=%t.%%r@%%h:%%p" + "-o" "ControlMaster=yes" + "-e" "none")) + (tramp-copy-args ("-o" "ControlPath=%t.%%r@%%h:%%p" + "-o" "ControlMaster=auto")) + (tramp-copy-keep-date-arg "-p") + (tramp-password-end-of-line nil)) ("scpx" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "ssh") (tramp-copy-program "scp") @@ -566,6 +577,7 @@ pair of the form (KEY VALUE). The following KEYs are defined: If `tramp-connection-function' is `tramp-open-connection-su', then \"%u\" in this list is replaced by the user name, and \"%%\" can be used to obtain a literal percent character. + \"%t\" is replaced by the temporary file name for `scp'-like methods. * `tramp-copy-program' This specifies the name of the program to use for remotely copying the file; this might be the absolute filename of rcp or the name of @@ -672,10 +684,39 @@ various functions for details." :type '(repeat (list string function string))) (defcustom tramp-default-method - (if (and (fboundp 'executable-find) - (executable-find "pscp")) - "pscp" - "scp") + ;; An external copy method seems to be preferred, because it is much + ;; more performant for large files, and it hasn't too serious delays + ;; for small files. But it must be ensured that there aren't + ;; permanent password queries. Either a password agent like + ;; "ssh-agent" or "Pageant" shall run, or the optional password.el + ;; package shall be active for password caching. "scpc" would be + ;; another good choice because of the "ControlMaster" option, but + ;; this is a more modern alternative in OpenSSH 4, which cannot be + ;; taken as default. + (let ((e-f (fboundp 'executable-find))) + (cond + ;; PuTTY is installed. + ((and e-f (funcall 'executable-find "pscp")) + (if (or (fboundp 'password-read) + ;; Pageant is running. + (and (fboundp 'w32-window-exists-p) + (funcall 'w32-window-exists-p "Pageant" "Pageant"))) + "pscp" + "plink")) + ;; There is an ssh installation. + ((and e-f (funcall 'executable-find "scp")) + (if (or (fboundp 'password-read) + ;; ssh-agent is running. + (getenv "SSH_AUTH_SOCK") + (getenv "SSH_AGENT_PID")) + "scp" + "ssh")) + ;; Under Emacs 20, `executable-find' does not exists. So we + ;; couldn't check whether there is an ssh implementation. Let's + ;; hope the best. + ((not e-f) "ssh") + ;; Fallback. + (t "ftp"))) "*Default method to use for transferring files. See `tramp-methods' for possibilities. Also see `tramp-default-method-alist'." @@ -913,8 +954,10 @@ See also `tramp-yn-prompt-regexp'." :type 'regexp) (defcustom tramp-yn-prompt-regexp - (concat (regexp-opt '("Store key in cache? (y/n)") t) - "\\s-*") + (concat + (regexp-opt '("Store key in cache? (y/n)" + "Update cached key? (y/n, Return cancels connection)") t) + "\\s-*") "Regular expression matching all y/n queries which need to be confirmed. The confirmation should be done with y or n. The regexp should match at end of buffer. @@ -2032,7 +2075,9 @@ If VAR is nil, then we bind `v' to the structure and `multi-method', ;; Enable debugging. (def-edebug-spec with-parsed-tramp-file-name (form symbolp body)) ;; Highlight as keyword. -(font-lock-add-keywords 'emacs-lisp-mode '("\\<with-parsed-tramp-file-name\\>")) +(when (functionp 'font-lock-add-keywords) + (funcall 'font-lock-add-keywords + 'emacs-lisp-mode '("\\<with-parsed-tramp-file-name\\>"))) (defmacro tramp-let-maybe (variable value &rest body) "Let-bind VARIABLE to VALUE in BODY, but only if VARIABLE is not obsolete. @@ -2822,17 +2867,18 @@ of." ;; The following isn't needed for Emacs 20 but for 19.34? -(defun tramp-handle-file-name-completion (filename directory) +(defun tramp-handle-file-name-completion + (filename directory &optional predicate) "Like `file-name-completion' for tramp files." (unless (tramp-tramp-file-p directory) (error "tramp-handle-file-name-completion invoked on non-tramp directory `%s'" directory)) - (with-parsed-tramp-file-name directory nil - (try-completion - filename - (mapcar (lambda (x) (cons x nil)) - (file-name-all-completions filename directory))))) + (try-completion + filename + (mapcar 'list (file-name-all-completions filename directory)) + (when predicate + (lambda (x) (funcall predicate (expand-file-name (car x) directory)))))) ;; cp, mv and ln @@ -3152,6 +3198,14 @@ be a local filename. The method used must be an out-of-band method." v2-user v2-host (tramp-shell-quote-argument v2-localname)))) + ;; Handle ControlMaster/ControlPath + (setq copy-args + (mapcar + (lambda (x) + (format-spec + x `((?t . ,(format "/tmp/%s" tramp-temp-name-prefix))))) + copy-args)) + ;; Handle keep-date argument (when keep-date (if t1 @@ -4474,7 +4528,6 @@ Falls back to normal file name handler if no tramp file name handler exists." "Checks whether method / user name / host name completion is active." (cond (tramp-completion-mode t) - ((not tramp-unified-filenames) t) ((string-match "^/.*:.*:$" file) nil) ((string-match (concat tramp-prefix-regexp @@ -4483,7 +4536,7 @@ Falls back to normal file name handler if no tramp file name handler exists." (member (match-string 1 file) (mapcar 'car tramp-methods))) ((or (equal last-input-event 'tab) ;; Emacs - (and (integerp last-input-event) + (and (wholenump last-input-event) (or ;; ?\t has event-modifier 'control (char-equal last-input-event ?\t) @@ -4585,10 +4638,14 @@ Falls back to normal file name handler if no tramp file name handler exists." ;; Method, host name and user name completion for a file. ;;;###autoload -(defun tramp-completion-handle-file-name-completion (filename directory) +(defun tramp-completion-handle-file-name-completion + (filename directory &optional predicate) "Like `file-name-completion' for tramp files." - (try-completion filename - (mapcar 'list (file-name-all-completions filename directory)))) + (try-completion + filename + (mapcar 'list (file-name-all-completions filename directory)) + (when predicate + (lambda (x) (funcall predicate (expand-file-name (car x) directory)))))) ;; I misuse a little bit the tramp-file-name structure in order to handle ;; completion possibilities for partial methods / user names / host names. @@ -5048,13 +5105,23 @@ hosts, or files, disagree." (defun tramp-touch (file time) "Set the last-modified timestamp of the given file. TIME is an Emacs internal time value as returned by `current-time'." - (let ((touch-time (format-time-string "%Y%m%d%H%M.%S" time t))) + (let* ((utc + ;; With GNU Emacs, `format-time-string' has an optional + ;; parameter UNIVERSAL. This is preferred. + (and (functionp 'subr-arity) + (= 3 (cdr (funcall (symbol-function 'subr-arity) + (symbol-function 'format-time-string)))))) + (touch-time + (if utc + (format-time-string "%Y%m%d%H%M.%S" time t) + (format-time-string "%Y%m%d%H%M.%S" time)))) (if (tramp-tramp-file-p file) (with-parsed-tramp-file-name file nil (let ((buf (tramp-get-buffer multi-method method user host))) (unless (zerop (tramp-send-command-and-check multi-method method user host - (format "TZ=UTC; export TZ; touch -t %s %s" + (format "%s touch -t %s %s" + (if utc "TZ=UTC; export TZ;" "") touch-time (tramp-shell-quote-argument localname)) t)) @@ -5491,6 +5558,7 @@ The terminal type can be configured with `tramp-terminal-type'." (defun tramp-process-actions (p multi-method method user host actions) "Perform actions until success." + (tramp-message 10 "%s" (mapconcat 'identity (process-command p) " ")) (let (exit) (while (not exit) (tramp-message 9 "Waiting for prompts from remote shell") @@ -5661,10 +5729,14 @@ arguments, and xx will be used as the host name to connect to. multi-method (tramp-find-method multi-method method user host) user host 'tramp-login-program)) - (login-args (tramp-get-method-parameter - multi-method - (tramp-find-method multi-method method user host) - user host 'tramp-login-args)) + (login-args (mapcar + (lambda (x) + (format-spec + x `((?t . ,(format "/tmp/%s" tramp-temp-name-prefix))))) + (tramp-get-method-parameter + multi-method + (tramp-find-method multi-method method user host) + user host 'tramp-login-args))) (real-host host)) ;; The following should be changed. We need a more general ;; mechanism to parse extra host args. @@ -6918,8 +6990,8 @@ localname (file name on remote host)." item) (while choices (setq item (pop choices)) - (when (and (string-match (nth 0 item) (or host "")) - (string-match (nth 1 item) (or user ""))) + (when (and (string-match (or (nth 0 item) "") (or host "")) + (string-match (or (nth 1 item) "") (or user ""))) (setq method (nth 2 item)) (setq choices nil))) method)) diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 710022f885b..8061b78e124 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -30,7 +30,7 @@ ;; are auto-frobbed from configure.ac, so you should edit that file and run ;; "autoconf && ./configure" to change them. -(defconst tramp-version "2.0.54" +(defconst tramp-version "2.0.55" "This version of Tramp.") (defconst tramp-bug-report-address "tramp-devel@gnu.org" diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el index e24ce702397..cbf298e2f10 100644 --- a/lisp/net/webjump.el +++ b/lisp/net/webjump.el @@ -1,6 +1,6 @@ ;;; webjump.el --- programmable Web hotlist -;; Copyright (C) 1996, 1997, 2002, 2003, 2004, +;; Copyright (C) 1996, 1997, 2001, 2002, 2003, 2004, ;; 2005, 2006 Free Software Foundation, Inc. ;; Author: Neil W. Van Dyke <nwv@acm.org> |