Function: tramp-connectable-p

tramp-connectable-p is a byte-compiled function defined in tramp.el.gz.

Signature

(tramp-connectable-p VEC-OR-FILENAME)

Documentation

Check, whether it is possible to connect the remote host w/o side-effects.

This is true, if either the remote host is already connected, or if we are not in completion mode.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(defun tramp-connectable-p (vec-or-filename)
  "Check, whether it is possible to connect the remote host w/o side-effects.
This is true, if either the remote host is already connected, or if we are
not in completion mode."
  (let ((tramp-verbose 0)
	(vec
	 (cond
	  ((tramp-file-name-p vec-or-filename) vec-or-filename)
	  ((tramp-tramp-file-p vec-or-filename)
	   (tramp-dissect-file-name vec-or-filename)))))
    (or ;; We check this for the process related to
	;; `tramp-buffer-name'; otherwise `start-file-process'
	;; wouldn't run ever when `non-essential' is non-nil.
        (and vec (process-live-p (get-process (tramp-buffer-name vec))))
	(not non-essential))))