* doc/misc/tramp.texi (Predefined connection information):
Mention also "androidsu" as special case of "tmpdir".
(Remote processes): Signals are not delivered to remote direct
async processes. Say, that there are restrictions for transfer of
binary data to remote direct async processes.
* lisp/net/tramp-compat.el (tramp-compat-temporary-file-directory):
Simplify.
(cherry picked from commit
6b3d69b16ed50c8a4dea1e3f1f9f231657e66590)
@item @t{"tmpdir"}
The temporary directory on the remote host. If not specified, the
-default value is @t{"/data/local/tmp"} for the @option{adb} method,
-@t{"/C$/Temp"} for the @option{smb} method, and @t{"/tmp"} otherwise.
-@xref{Temporary directory}.
+default value is @t{"/data/local/tmp"} for the @option{adb} and
+@option{androidsu} methods, @t{"/C$/Temp"} for the @option{smb}
+method, and @t{"/tmp"} otherwise. @xref{Temporary directory}.
@item @t{"posix"}
It does not report the remote terminal name via @code{process-tty-name}.
@item
-It does not set process property @code{remote-pid}.
+It does not set process property @code{remote-pid}. Consequently,
+signals cannot be sent to that remote process; they are sent to the
+local process instead, which establishes the connection.
@item
It fails, when the command is too long. This can happen on
supported but deprecated, and it will be removed in a future
@value{tramp} version.
+@strong{Note}: For the @option{ssh} and @option{scp} methods,
+@value{tramp} does not faithfully pass binary sequences on to the
+process. You can change this by changing the respective connection
+argument (@pxref{Predefined connection information}) via
+
+@lisp
+(add-to-list 'tramp-connection-properties (list "/ssh:" "direct-async" t))
+@end lisp
+
@node Cleanup remote connections
@section Cleanup remote connections
;; Some properties are handled special:
;;
-;; - Properties which start with a space, like " process-name", are
-;; not saved in the file `tramp-persistency-file-name', although
-;; being connection properties related to a `tramp-file-name'
-;; structure.
+;; - Ephemeral properties which start with a space, like
+;; " process-name", are not saved in the file
+;; `tramp-persistency-file-name', although being connection
+;; properties related to a `tramp-file-name' structure.
;;
;; - Reusable properties, which should not be saved, are kept in the
;; process key retrieved by `tramp-get-process' (the main connection
;; recomputation when a new asynchronous process is created by
;; `make-process'. Examples are "unsafe-temporary-file",
;; "remote-path", "device" (tramp-adb.el) or "share" (tramp-gvfs.el).
+;; FIXME: Shall they be converted to ephemeral connection properties?
;;; Code:
;; an infloop. We try to follow the XDG specification, for security reasons.
(defconst tramp-compat-temporary-file-directory
(file-name-as-directory
- (if-let ((xdg (xdg-cache-home))
- ((file-directory-p xdg))
- ((file-writable-p xdg)))
- (prog1 (setq xdg (file-name-concat xdg "emacs"))
+ (if-let* ((xdg (xdg-cache-home))
+ ((file-directory-p xdg))
+ ((file-writable-p xdg)))
+ (prog1 (setq xdg (expand-file-name "emacs" xdg))
(make-directory xdg t))
(eval (car (get 'temporary-file-directory 'standard-value)) t)))
"The default value of `temporary-file-directory' for Tramp.")
;; are developers using `outline-minor-mode' in Lisp files, we still
;; keep this quoting.
;;
+;; * Use `with-environment-variables'.
+;;
;; * Starting with Emacs 29.1, use `buffer-match-p'.
;;
;; * Starting with Emacs 29.1, use `string-split'.
(tramp-error v 'file-error "Cannot expand tilde in file `%s'" name))
(unless (tramp-run-real-handler #'file-name-absolute-p (list localname))
(setq localname (concat "/" localname)))
- ;; Do not keep "/..".
+ ;; Do not keep "/..".
(when (string-match-p (rx bos "/" (** 1 2 ".") eos) localname)
(setq localname "/"))
;; Do normal `expand-file-name' (this does "/./" and "/../"),
;;
;; * Implement user and host name completion for multi-hops. Some
;; methods in tramp-container.el have it already.
+;;
+;; * Make it configurable, which environment variables are set in
+;; direct async processes.
+;;
+;; * Pass working dir for direct async processes, for example for
+;; container methods.
;;; tramp.el ends here