diff options
| author | Glenn Morris | 2014-05-07 20:41:21 -0700 |
|---|---|---|
| committer | Glenn Morris | 2014-05-07 20:41:21 -0700 |
| commit | fb3f83f5fd9e80347c8b8e36f6eaefbb912fe57b (patch) | |
| tree | f106c360c3aef01bcacdc77b66b7c5b20261502e /lisp/net | |
| parent | 1ba38c429fa6ce17568771ef51c8e53b1a72bb94 (diff) | |
| parent | 606695a67801acfd1792110e4ea3228b50b0117d (diff) | |
| download | emacs-fb3f83f5fd9e80347c8b8e36f6eaefbb912fe57b.tar.gz emacs-fb3f83f5fd9e80347c8b8e36f6eaefbb912fe57b.zip | |
Merge from emacs-24; up to 2014-05-08T03:34:20Z!rgm@gnu.org
Diffstat (limited to 'lisp/net')
| -rw-r--r-- | lisp/net/browse-url.el | 3 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 52 |
2 files changed, 35 insertions, 20 deletions
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 893bfa487e3..4364490f431 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el | |||
| @@ -1340,6 +1340,9 @@ used instead of `browse-url-new-window-flag'." | |||
| 1340 | (kill-buffer nil))) | 1340 | (kill-buffer nil))) |
| 1341 | (if (and pid (zerop (signal-process pid 0))) ; Mosaic running | 1341 | (if (and pid (zerop (signal-process pid 0))) ; Mosaic running |
| 1342 | (save-excursion | 1342 | (save-excursion |
| 1343 | ;; This is a predictable temp-file name, which is bad, | ||
| 1344 | ;; but it is what Mosaic uses/used. | ||
| 1345 | ;; So it's not Emacs's problem. http://bugs.debian.org/747100 | ||
| 1343 | (find-file (format "/tmp/Mosaic.%d" pid)) | 1346 | (find-file (format "/tmp/Mosaic.%d" pid)) |
| 1344 | (erase-buffer) | 1347 | (erase-buffer) |
| 1345 | (insert (if (browse-url-maybe-new-window new-window) | 1348 | (insert (if (browse-url-maybe-new-window new-window) |
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 9c86c8c48bd..900e1c812ae 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -425,7 +425,7 @@ as given in your `~/.profile'." | |||
| 425 | 425 | ||
| 426 | ;;;###tramp-autoload | 426 | ;;;###tramp-autoload |
| 427 | (defcustom tramp-remote-process-environment | 427 | (defcustom tramp-remote-process-environment |
| 428 | `("HISTFILE=$HOME/.tramp_history" "HISTSIZE=1" "TMOUT=0" "LC_CTYPE=''" | 428 | `("TMOUT=0" "LC_CTYPE=''" |
| 429 | ,(format "TERM=%s" tramp-terminal-type) | 429 | ,(format "TERM=%s" tramp-terminal-type) |
| 430 | "EMACS=t" ;; Deprecated. | 430 | "EMACS=t" ;; Deprecated. |
| 431 | ,(format "INSIDE_EMACS='%s,tramp:%s'" emacs-version tramp-version) | 431 | ,(format "INSIDE_EMACS='%s,tramp:%s'" emacs-version tramp-version) |
| @@ -440,6 +440,7 @@ which might have been set in the init files like ~/.profile. | |||
| 440 | Special handling is applied to the PATH environment, which should | 440 | Special handling is applied to the PATH environment, which should |
| 441 | not be set here. Instead, it should be set via `tramp-remote-path'." | 441 | not be set here. Instead, it should be set via `tramp-remote-path'." |
| 442 | :group 'tramp | 442 | :group 'tramp |
| 443 | :version "24.4" | ||
| 443 | :type '(repeat string)) | 444 | :type '(repeat string)) |
| 444 | 445 | ||
| 445 | (defcustom tramp-sh-extra-args '(("/bash\\'" . "-norc -noprofile")) | 446 | (defcustom tramp-sh-extra-args '(("/bash\\'" . "-norc -noprofile")) |
| @@ -491,9 +492,9 @@ This list is used for copying/renaming with out-of-band methods. | |||
| 491 | See `tramp-actions-before-shell' for more info.") | 492 | See `tramp-actions-before-shell' for more info.") |
| 492 | 493 | ||
| 493 | (defconst tramp-uudecode | 494 | (defconst tramp-uudecode |
| 494 | "(echo begin 600 /tmp/tramp.$$; tail +2) | uudecode | 495 | "(echo begin 600 %t; tail -n +2) | uudecode |
| 495 | cat /tmp/tramp.$$ | 496 | cat %t |
| 496 | rm -f /tmp/tramp.$$" | 497 | rm -f %t" |
| 497 | "Shell function to implement `uudecode' to standard output. | 498 | "Shell function to implement `uudecode' to standard output. |
| 498 | Many systems support `uudecode -o /dev/stdout' or `uudecode -o -' | 499 | Many systems support `uudecode -o /dev/stdout' or `uudecode -o -' |
| 499 | for this or `uudecode -p', but some systems don't, and for them | 500 | for this or `uudecode -p', but some systems don't, and for them |
| @@ -3726,8 +3727,7 @@ file exists and nonzero exit status otherwise." | |||
| 3726 | (with-tramp-progress-reporter | 3727 | (with-tramp-progress-reporter |
| 3727 | vec 5 (format "Opening remote shell `%s'" shell) | 3728 | vec 5 (format "Opening remote shell `%s'" shell) |
| 3728 | ;; Find arguments for this shell. | 3729 | ;; Find arguments for this shell. |
| 3729 | (let ((tramp-end-of-output tramp-initial-end-of-output) | 3730 | (let ((alist tramp-sh-extra-args) |
| 3730 | (alist tramp-sh-extra-args) | ||
| 3731 | item extra-args) | 3731 | item extra-args) |
| 3732 | (while (and alist (null extra-args)) | 3732 | (while (and alist (null extra-args)) |
| 3733 | (setq item (pop alist)) | 3733 | (setq item (pop alist)) |
| @@ -3735,18 +3735,12 @@ file exists and nonzero exit status otherwise." | |||
| 3735 | (setq extra-args (cdr item)))) | 3735 | (setq extra-args (cdr item)))) |
| 3736 | (tramp-send-command | 3736 | (tramp-send-command |
| 3737 | vec (format | 3737 | vec (format |
| 3738 | "exec env ENV='' PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s" | 3738 | "exec env ENV='' HISTFILE=/dev/null PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s" |
| 3739 | (tramp-shell-quote-argument tramp-end-of-output) | 3739 | (tramp-shell-quote-argument tramp-end-of-output) |
| 3740 | shell (or extra-args "")) | 3740 | shell (or extra-args "")) |
| 3741 | t)) | 3741 | t)) |
| 3742 | (tramp-set-connection-property | 3742 | (tramp-set-connection-property |
| 3743 | (tramp-get-connection-process vec) "remote-shell" shell) | 3743 | (tramp-get-connection-process vec) "remote-shell" shell))) |
| 3744 | ;; Setting prompts. | ||
| 3745 | (tramp-send-command | ||
| 3746 | vec (format "PS1=%s" (tramp-shell-quote-argument tramp-end-of-output)) t) | ||
| 3747 | (tramp-send-command vec "PS2=''" t) | ||
| 3748 | (tramp-send-command vec "PS3=''" t) | ||
| 3749 | (tramp-send-command vec "PROMPT_COMMAND=''" t))) | ||
| 3750 | 3744 | ||
| 3751 | (defun tramp-find-shell (vec) | 3745 | (defun tramp-find-shell (vec) |
| 3752 | "Opens a shell on the remote host which groks tilde expansion." | 3746 | "Opens a shell on the remote host which groks tilde expansion." |
| @@ -4045,7 +4039,7 @@ Each item is a list that looks like this: | |||
| 4045 | 4039 | ||
| 4046 | \(FORMAT ENCODING DECODING [TEST]\) | 4040 | \(FORMAT ENCODING DECODING [TEST]\) |
| 4047 | 4041 | ||
| 4048 | FORMAT is symbol describing the encoding/decoding format. It can be | 4042 | FORMAT is a symbol describing the encoding/decoding format. It can be |
| 4049 | `b64' for base64 encoding, `uu' for uu encoding, or `pack' for simple packing. | 4043 | `b64' for base64 encoding, `uu' for uu encoding, or `pack' for simple packing. |
| 4050 | 4044 | ||
| 4051 | ENCODING and DECODING can be strings, giving commands, or symbols, | 4045 | ENCODING and DECODING can be strings, giving commands, or symbols, |
| @@ -4055,9 +4049,11 @@ filename will be put into the command line at that spot. If the | |||
| 4055 | specifier is not present, the input should be read from standard | 4049 | specifier is not present, the input should be read from standard |
| 4056 | input. | 4050 | input. |
| 4057 | 4051 | ||
| 4058 | If they are variables, this variable is a string containing a Perl | 4052 | If they are variables, this variable is a string containing a |
| 4059 | implementation for this functionality. This Perl program will be transferred | 4053 | Perl or Shell implementation for this functionality. This |
| 4060 | to the remote host, and it is available as shell function with the same name. | 4054 | program will be transferred to the remote host, and it is |
| 4055 | available as shell function with the same name. A \"%t\" format | ||
| 4056 | specifier in the variable value denotes a temporary file. | ||
| 4061 | 4057 | ||
| 4062 | The optional TEST command can be used for further tests, whether | 4058 | The optional TEST command can be used for further tests, whether |
| 4063 | ENCODING and DECODING are applicable.") | 4059 | ENCODING and DECODING are applicable.") |
| @@ -4136,10 +4132,25 @@ Goes through the list `tramp-local-coding-commands' and | |||
| 4136 | (throw 'wont-work-remote nil)) | 4132 | (throw 'wont-work-remote nil)) |
| 4137 | 4133 | ||
| 4138 | (when (not (stringp rem-dec)) | 4134 | (when (not (stringp rem-dec)) |
| 4139 | (let ((name (symbol-name rem-dec))) | 4135 | (let ((name (symbol-name rem-dec)) |
| 4136 | (value (symbol-value rem-dec)) | ||
| 4137 | tmpfile) | ||
| 4140 | (while (string-match (regexp-quote "-") name) | 4138 | (while (string-match (regexp-quote "-") name) |
| 4141 | (setq name (replace-match "_" nil t name))) | 4139 | (setq name (replace-match "_" nil t name))) |
| 4142 | (tramp-maybe-send-script vec (symbol-value rem-dec) name) | 4140 | (when (string-match "%t" value) |
| 4141 | (setq tmpfile | ||
| 4142 | (make-temp-name | ||
| 4143 | (expand-file-name | ||
| 4144 | tramp-temp-name-prefix | ||
| 4145 | (tramp-get-remote-tmpdir vec))) | ||
| 4146 | value | ||
| 4147 | (format-spec | ||
| 4148 | value | ||
| 4149 | (format-spec-make | ||
| 4150 | ?t | ||
| 4151 | (tramp-file-name-handler | ||
| 4152 | 'file-remote-p tmpfile 'localname))))) | ||
| 4153 | (tramp-maybe-send-script vec value name) | ||
| 4143 | (setq rem-dec name))) | 4154 | (setq rem-dec name))) |
| 4144 | (tramp-message | 4155 | (tramp-message |
| 4145 | vec 5 | 4156 | vec 5 |
| @@ -4456,6 +4467,7 @@ connection if a previous connection has died for some reason." | |||
| 4456 | (delete-process p)) | 4467 | (delete-process p)) |
| 4457 | (setenv "TERM" tramp-terminal-type) | 4468 | (setenv "TERM" tramp-terminal-type) |
| 4458 | (setenv "LC_ALL" "en_US.utf8") | 4469 | (setenv "LC_ALL" "en_US.utf8") |
| 4470 | (setenv "HISTFILE" "/dev/null") | ||
| 4459 | (setenv "PROMPT_COMMAND") | 4471 | (setenv "PROMPT_COMMAND") |
| 4460 | (setenv "PS1" tramp-initial-end-of-output) | 4472 | (setenv "PS1" tramp-initial-end-of-output) |
| 4461 | (let* ((target-alist (tramp-compute-multi-hops vec)) | 4473 | (let* ((target-alist (tramp-compute-multi-hops vec)) |