Function: xselect-tt-net-file
xselect-tt-net-file is a byte-compiled function defined in
select.el.gz.
Signature
(xselect-tt-net-file FILE)
Documentation
Get the canonical ToolTalk filename for FILE.
FILE must be a local file, or otherwise the conversion will fail.
The string returned has three components: the hostname of the
machine where the file is, the real path, and the local path.
They are encoded into a string of the form
"HOST=0-X,RPATH=X-Y,LPATH=Y-Z:DATA", where X, Y, and Z are the
positions of the hostname, rpath and lpath inside DATA.
Source Code
;; Defined in /usr/src/emacs/lisp/select.el.gz
(defun xselect-tt-net-file (file)
"Get the canonical ToolTalk filename for FILE.
FILE must be a local file, or otherwise the conversion will fail.
The string returned has three components: the hostname of the
machine where the file is, the real path, and the local path.
They are encoded into a string of the form
\"HOST=0-X,RPATH=X-Y,LPATH=Y-Z:DATA\", where X, Y, and Z are the
positions of the hostname, rpath and lpath inside DATA."
(let ((hostname (system-name))
(rpath file)
(lpath file))
(format "HOST=0-%d,RPATH=%d-%d,LPATH=%d-%d:%s%s%s"
(1- (length hostname)) (length hostname)
(1- (+ (length hostname) (length rpath)))
(+ (length hostname) (length rpath))
(1- (+ (length hostname) (length rpath)
(length lpath)))
hostname rpath lpath)))