ayrat555 / cargo-mode

Emacs minor mode which allows to dynamically select cargo command
MIT License
20 stars 9 forks source link

Path issue when using cargo command in remote buffer #14

Closed sunng87 closed 1 week ago

sunng87 commented 1 week ago

Thank you for building this mode!

I'm using this cargo mode from my remote buffer. It seems it always finds cargo command from /sbin/cargo instead of my PATH.

/sbin/cargo clippy
/bin/sh: 2: /sbin/cargo: not found

Comint exited abnormally with code 127 at Thu Sep 26 15:27:26, duration 0.60 s

I used to have similar issue with eglot finding rust-analyzer but when add (add-to-list 'tramp-remote-path 'tramp-own-remote-path) it becomes fine. I think cargo-mode should also respect this path settings from tramp when calling cargo binary.

ayrat555 commented 1 week ago

@sunng87 what do you think about setting cargo-path-to-bin var manually?

sunng87 commented 1 week ago

We can use var as fallback. But it's still nice if we can follow the PATH

sunng87 commented 1 week ago

This should be fixed in #15.