magit
magit copied to clipboard
magit-revert-rev-file-buffer: Use set-auto-mode
For that newly-opened buffer to have syntax coloring this function briefly sets buffer-file-name and performs (normal-mode t). This, in turn, triggers related major-mode hooks, which at least in the case of lsp causes issues.
An attempt was made to resolve this in f331092df but it didn't seem to resolve the issue.
Because of how the buffers are named, set-auto-mode couldn't work out which mode to use; so this has been swapped around.
This PR is slightly more disruptive than the previous change, so I accept that I may have to make other changes :)
Closes https://github.com/doomemacs/doomemacs/pull/6309
fyi, applying this patch makes syntax coloring not work (e.g. rustic-mode is not starting) 😢
fyi, applying this patch makes syntax coloring not work (e.g. rustic-mode is not starting) 😢
Are you sure? It was working fine for me and you said it was working before :p
Are you sure?
Pretty sure, I've just tried it a few times :x
you said it was working before :p
Which I've then corrected by saying Ah wait, sorry - I think I've forgotten to undo my change before applying yours
😅
Okay, I'll keep this open but for now it may not work
I'm closing this for now. Please ping me when you are ready.
@tarsius This has been confirmed to be resolved either by doom or magit; so all's well in the end.
Apologies this was left hanging for so long