You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The watcher changes the active buffer when calling the save function, which causes minor annoyance. For instance, if the mode line distinguishes between focused and unfocused buffers, it causes a blink every 2 seconds.
As far as I can tell, it's due to the call to magit-get-branch which uses a temporary buffer. Replacing the call with a direct system call "git rev-parse --abbrev-ref HEAD" should fix it.
More generally, I'm not sure that running the heartbeat function on a timer is the best way to proceed. Hooking into window-buffer-change-functions and window-selection-change-functions instead would have the double advantage of capturing buffers which are used for less than 2 seconds, and to avoid calling the function thousands of times if the active buffer doesn't change.
But those variables are only for emacs >= 27.1.
The text was updated successfully, but these errors were encountered:
ThibautVerron
changed the title
Saving the heartbeat changes the buffer
The watcher causes the mode line to blink
Jan 12, 2022
Actually, I'm not sure that the cause for the blink is what I said.
When the watcher is called, the mode-line shows the work buffer as inactive. It remains that way until a key is pressed.
It also doesn't seem to happen for all buffers or all files.
Edit: And now, after a couple of restarts, it's completely gone. I know it was caused by activity watch because disabling and enabling the mode made the blink come and go, but if even I can't reproduce it anymore, I'm not sure if the issue should remain open.
Hi,
The watcher changes the active buffer when calling the save function, which causes minor annoyance. For instance, if the mode line distinguishes between focused and unfocused buffers, it causes a blink every 2 seconds.
As far as I can tell, it's due to the call to magit-get-branch which uses a temporary buffer. Replacing the call with a direct system call "git rev-parse --abbrev-ref HEAD" should fix it.
More generally, I'm not sure that running the heartbeat function on a timer is the best way to proceed. Hooking into
window-buffer-change-functions
andwindow-selection-change-functions
instead would have the double advantage of capturing buffers which are used for less than 2 seconds, and to avoid calling the function thousands of times if the active buffer doesn't change.But those variables are only for emacs >= 27.1.
The text was updated successfully, but these errors were encountered: