Skip to main content
added 170 characters in body
Source Link
tarsius
  • 26.3k
  • 4
  • 74
  • 111

You shouldn't have to set magit-refresh-status-buffer to a non-nil value because the default value already is t. (Magit only refreshes after Emacs changed a file (i.e. on save-buffer) and after it ran git for side-effects.)

It sounds like you want the status buffer to be automatically refreshed when something outside of Emacs changes a file. Magit's refresh machinery does not support that - you will have to explicitly refresh using g.

It would theoretically be possible to watch for changes and then automatically refresh the status buffer, but that would affect performance and could lead to race conditions. There actually exists a package that implements this, magit-filenotify, but I recommend against using it because it has the issues mentioned earlier and also because it wasn't updated in two years.


To automatically refresh the status buffer whenever you visit a file-visiting buffer use:

(add-hook 'after-save-hook 'magit-after-save-refresh-status t)

You shouldn't have to set magit-refresh-status-buffer to a non-nil value because the default value already is t. (Magit only refreshes after Emacs changed a file (i.e. on save-buffer) and after it ran git for side-effects.)

It sounds like you want the status buffer to be automatically refreshed when something outside of Emacs changes a file. Magit's refresh machinery does not support that - you will have to explicitly refresh using g.

It would theoretically be possible to watch for changes and then automatically refresh the status buffer, but that would affect performance and could lead to race conditions. There actually exists a package that implements this, magit-filenotify, but I recommend against using it because it has the issues mentioned earlier and also because it wasn't updated in two years.

You shouldn't have to set magit-refresh-status-buffer to a non-nil value because the default value already is t. (Magit only refreshes after Emacs changed a file (i.e. on save-buffer) and after it ran git for side-effects.)

It sounds like you want the status buffer to be automatically refreshed when something outside of Emacs changes a file. Magit's refresh machinery does not support that - you will have to explicitly refresh using g.

It would theoretically be possible to watch for changes and then automatically refresh the status buffer, but that would affect performance and could lead to race conditions. There actually exists a package that implements this, magit-filenotify, but I recommend against using it because it has the issues mentioned earlier and also because it wasn't updated in two years.


To automatically refresh the status buffer whenever you visit a file-visiting buffer use:

(add-hook 'after-save-hook 'magit-after-save-refresh-status t)
Source Link
tarsius
  • 26.3k
  • 4
  • 74
  • 111

You shouldn't have to set magit-refresh-status-buffer to a non-nil value because the default value already is t. (Magit only refreshes after Emacs changed a file (i.e. on save-buffer) and after it ran git for side-effects.)

It sounds like you want the status buffer to be automatically refreshed when something outside of Emacs changes a file. Magit's refresh machinery does not support that - you will have to explicitly refresh using g.

It would theoretically be possible to watch for changes and then automatically refresh the status buffer, but that would affect performance and could lead to race conditions. There actually exists a package that implements this, magit-filenotify, but I recommend against using it because it has the issues mentioned earlier and also because it wasn't updated in two years.