From c32a3ac3de75eb9c94dbfd417a0c6508d350fa69 Mon Sep 17 00:00:00 2001 From: Daniel Patterson Date: Mon, 29 Oct 2018 21:09:00 -0400 Subject: Use non-remote path to expand paths in _CoqProject when file is remote. When editing a remote file, the `coqtop` process will itself be remote, which means that the paths that are passed to it should be _local_, not remote. Otherwise, paths like '/ssh:hostname:/path/to/dir' get passed to `coqtop`, which has no idea what's going on. This relates to #203. --- coq/coq-system.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/coq/coq-system.el b/coq/coq-system.el index e3164644..68d036f1 100644 --- a/coq/coq-system.el +++ b/coq/coq-system.el @@ -547,9 +547,11 @@ variable." (let* ((contents (with-current-buffer proj-file-buf (buffer-string))) (options (coq--read-options-from-project-file contents)) (proj-file-name (buffer-file-name proj-file-buf)) - (proj-file-dir (file-name-directory proj-file-name))) + (proj-file-dir (file-name-directory proj-file-name)) + (proj-file-local-dir (or (file-remote-p proj-file-dir 'localname) + proj-file-dir))) (unless avoidargs (setq coq-prog-args (coq--extract-prog-args options))) - (unless avoidpath (setq coq-load-path (coq--extract-load-path options proj-file-dir))) + (unless avoidpath (setq coq-load-path (coq--extract-load-path options proj-file-local-dir))) (let ((msg (cond ((and avoidpath avoidargs) "Coqtop args and load path") -- cgit v1.2.3