Add vc-retrieve-tag-hook to mood-line--hooks-alist #14

Open
krydos wants to merge 1 commits from krydos/mood-line:vc-status-update into main
First-time contributor

Hi Jessie,
thanks for the package. I've been using it for quite awhile.

The issue I have is when I switch git branches with vc-switch-branch I don't see the change reflected in mood-line until I revert-buffer.
It confused me a few times when I was inspecting a file and couldn't find my recent changes (because I forgot that I switched branches while mood-line was confirming my bias of me thinking that I am in correct branch)

I've discovered vc-retrieve-tag-hook that can be used to refresh mood-line status.

Steps to reproduce:

  • open a file in any git repo
  • mood-line shows current branch correctly
  • press C-c v b s (or M-x vc-switch-branch) and pick another branch
  • branch name isn't changed in mood-line

Let me know what do you think and if there is a better way to "subscribe" to git branch changes.

Thanks!

P.S.
it seems like it isn't an issue in the default emacs' mode-line.

EDIT:
forgot to mention my M-x version is GNU Emacs 30.0.92 (build 1, aarch64-apple-darwin23.6.0, NS appkit-2487.70 Version 14.6 (Build 23G80)) of 2024-11-07.

Hi Jessie, thanks for the package. I've been using it for quite awhile. The issue I have is when I switch git branches with `vc-switch-branch` I don't see the change reflected in mood-line until I `revert-buffer`. It confused me a few times when I was inspecting a file and couldn't find my recent changes (because I forgot that I switched branches while mood-line was confirming my bias of me thinking that I am in correct branch) I've discovered `vc-retrieve-tag-hook` that can be used to refresh mood-line status. Steps to reproduce: - open a file in any git repo - _mood-line shows current branch correctly_ - press `C-c v b s` (or `M-x vc-switch-branch`) and pick another branch - _branch name isn't changed in mood-line_ Let me know what do you think and if there is a better way to "subscribe" to git branch changes. Thanks! P.S. it seems like it isn't an issue in the default emacs' mode-line. EDIT: forgot to mention my `M-x version` is `GNU Emacs 30.0.92 (build 1, aarch64-apple-darwin23.6.0, NS appkit-2487.70 Version 14.6 (Build 23G80)) of 2024-11-07`.
krydos added 1 commit 2024-11-17 02:30:10 +00:00
This change should help mood-line to update displayed vs status
when branch is switched using vc-switch-branch
This pull request can be merged automatically.
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u vc-status-update:krydos-vc-status-update
git checkout krydos-vc-status-update
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: jessieh/mood-line#14
No description provided.