Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make `rustic-format-start-process' work over tramp. #4

Merged
merged 1 commit into from
May 17, 2024

Conversation

CeleritasCelery
Copy link
Contributor

Description from @sp1ff in brotzeit/rustic#522 :

rustic-rustfmt-bin' selects the rustfmt binary to run depending on whether the current buffer is local (in which case rustic-rustfmt-bin' will be used) or remote
(`rustic-rustfmt-bin-remote').

rustic-format-start-process' invokes rustic-rustfmt-bin' inside a `with-current-buffer' form that makes the error buffer current, which will always seem local, regardless of whether the buffer being formatted is local or not

This patch invokes `rustic-rustfmt-bin' as one of the let bindings so that the correct binary will be selected.

`rustic-rustfmt-bin' selects the rustfmt binary to run depending on
whether the current buffer is local (in which case
`rustic-rustfmt-bin' will be used) or remote
(`rustic-rustfmt-bin-remote').

`rustic-format-start-process' invokes `rustic-rustfmt-bin' inside a
`with-current-buffer' form that makes the error buffer current, which
will always seem local, regardless of whether the buffer being
formatted is local or not

This patch invokes `rustic-rustfmt-bin' as one of the let bindings
so that the correct binary will be selected.
@CeleritasCelery CeleritasCelery force-pushed the format-start-process-broken-on-remote branch from 54b2a2c to 446043c Compare May 17, 2024 18:32
@CeleritasCelery CeleritasCelery merged commit 7e51d36 into main May 17, 2024
4 checks passed
@CeleritasCelery CeleritasCelery deleted the format-start-process-broken-on-remote branch May 17, 2024 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants