1

I use smart-mode-line package and I noticed when I change/checkout branches in command line, or in Magit, this is not reflected in the Smart Mode Line. I still see the name of the old branch, while I checked out the other branch.

I need to call M-x revert-buffer to see the actual branch reflected in Smart Mode Line.

These option gives me an error, while in documentation I need to supply REVISION in magit-checkout parameter, which is unknown in Emacs Lisp as variable:

  (add-function :after (magit-checkout) #'revert-buffer)

And this didn't help either:

(setq magit-auto-revert-mode t)

So I'm running out of ideas. Anyone?

Drew
  • 75,699
  • 9
  • 109
  • 225
ReneFroger
  • 3,855
  • 22
  • 63

1 Answers1

1

magit-auto-revert-mode is a mode and therefore should be enabled by calling the mode function, not by setting the variable. But it is supposed to be enabled by default, so you shouldn't have to do that.

(But you might have disabled this a long time ago, possibly using an old implementation, so it might get disabled for non-obvious reasons. Check your configuration for occurrences not only of magit-auto-revert-mode, but also magit-revert-buffers, and remove all that.)

For me the buffer information gets automatically updated without any additional configuration and I am using smart-mode-line too. So you should proceed by disabling your own customization and all packages not required by magit and check whether it works then. If so, proceed by enabling more and more of your packages and customization until it breaks again. This will allow you to narrow the issue down.

tarsius
  • 25,298
  • 4
  • 69
  • 109