Function: eca-config--server-path-to-local

eca-config--server-path-to-local is a natively compiled function defined in eca-config.el.

Signature

(eca-config--server-path-to-local PATH SESSION)

Documentation

Translate PATH reported by the server of SESSION to a local path.

Applies the session path mappings; when the workspace folders are remote and no mapping applied, reuse their TRAMP prefix so the file is opened on the host running the server.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-config.el
(defun eca-config--server-path-to-local (path session)
  "Translate PATH reported by the server of SESSION to a local path.
Applies the session path mappings; when the workspace folders are
remote and no mapping applied, reuse their TRAMP prefix so the file
is opened on the host running the server."
  (let* ((eca--path-session session)
         (local (eca--path-remote-to-local path)))
    (if-let* ((remote (and (string= local path)
                           (-some #'file-remote-p
                                  (eca--session-workspace-folders session)))))
        (concat remote path)
      local)))