diff options
author | Daniel Patterson <dbp@dbpmail.net> | 2018-10-29 21:09:00 -0400 |
---|---|---|
committer | Daniel Patterson <dbp@dbpmail.net> | 2018-10-30 10:24:00 -0400 |
commit | c32a3ac3de75eb9c94dbfd417a0c6508d350fa69 (patch) | |
tree | d056d0ac857e5a32dcdc3cb5d92ef553f3070c7c | |
parent | 5b7b84bc5b44fd87905b16a67367ece4e7fa7ee3 (diff) |
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.
-rw-r--r-- | coq/coq-system.el | 6 |
1 files 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") |