Function: ghostel--write-remote-file
ghostel--write-remote-file is a natively compiled function defined in
ghostel-shell.el.
Signature
(ghostel--write-remote-file TRAMP-PATH CONTENT)
Documentation
Write CONTENT to TRAMP-PATH on the remote host.
CONTENT may be a unibyte string (e.g. compiled terminfo bytes) or
a multibyte string (e.g. shell rc). The temp buffer is set unibyte
when CONTENT is unibyte so byte values round-trip without depending
on an outer coding-system-for-write binding.
Source Code
;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel-shell.el
(defun ghostel--write-remote-file (tramp-path content)
"Write CONTENT to TRAMP-PATH on the remote host.
CONTENT may be a unibyte string (e.g. compiled terminfo bytes) or
a multibyte string (e.g. shell rc). The temp buffer is set unibyte
when CONTENT is unibyte so byte values round-trip without depending
on an outer `coding-system-for-write' binding."
(with-temp-buffer
(when (not (multibyte-string-p content))
(set-buffer-multibyte nil))
(insert content)
(write-region (point-min) (point-max) tramp-path nil 'silent)))