Skip to content

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

Merged
CeleritasCelery merged 1 commit intomainfrom
format-start-process-broken-on-remote
May 17, 2024
Merged

Make `rustic-format-start-process' work over tramp.#4
CeleritasCelery merged 1 commit intomainfrom
format-start-process-broken-on-remote

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
@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