Questions tagged [vc-mode]
19 questions
6
votes
2 answers
*vc-dir* show ignored files
From some newer version of Emacs (I currently on 24.5.1) after some operation *vc-dir* buffer begin to show ignored files.
I specially craft .hgignore to make list of hg status short. But Emacs vc-mode doesn't respect my preference.
Is it possible…

gavenkoa
- 3,352
- 19
- 36
5
votes
1 answer
Disabling automatic add after resolving git conflict
After updating emacs (to 25.2.2 as shipping in ubuntu 18.04) I notice a change that completely breaks my conflict resolution flow in git. Once I resolve a conflict using emacs and save the file, emacs automatically does "git add" on the file. This…

miffo
- 101
- 5
4
votes
1 answer
Version control information out of sync with certain modes
Sometimes, though seemingly not in a consistent way, some modes that use version control information do not get updated correctly after git commands are run (e.g.,diff-hl-mode or git-gutter-mode indicate uncommitted changes though those changes have…

elethan
- 4,755
- 3
- 29
- 56
3
votes
2 answers
How to query the name of the current branch in an elisp function?
I'd like to know the current branch I'm in (in elisp), is there a generic function that returns the name of the current branch?
From looking into vc-mode mode-line logic it seems this relies on private functionality.
Is there a generic way to access…

ideasman42
- 8,375
- 1
- 28
- 105
3
votes
1 answer
Make VC log history to follow file renames
I like to see full file history regardless file renames (and with Java convention class name == file name several refactoring makes following history difficult).

gavenkoa
- 3,352
- 19
- 36
3
votes
1 answer
Version control: how to inhibit opening email buffer upon breaking lock
My work uses GNU RCS for our version control system, but I don't think the specific VCS is relevant here. (I know RCS isn't the most modern system but it suits our needs fine and has the advantage of relative simplicity. Anyway, that's not the…

MTS
- 377
- 1
- 10
3
votes
0 answers
Determine if a directory is .gitignored with vc
I would like to determine if the current directory/file is ignored by .gitignore with vc. In this case, only git matters, but of course a general solution would be appreciated.

PythonNut
- 10,243
- 2
- 29
- 75
2
votes
1 answer
How to add branch label next to projectile string with smart-mode-line
This is something I asked on the official repository.
By default, smart-mode-line displays the current projectile project-name before the buffer-name, and the vc-mode string after it:
... [P/myproject]BUFFER-NAME :master ...
I would like to…

Mathieu Marques
- 1,953
- 1
- 13
- 30
1
vote
1 answer
Is there a way to see a log of the backend commands issued by VC commands?
I'd like to see the what commands are issued by the child process used by the various VC commands. Is there a way to log them or collect them without modifying the VC code?
For example, I'd like to see what Git command(s) are issued when the C-x v…

PRouleau
- 744
- 3
- 10
1
vote
0 answers
Git status on modeline to indicate if behind remote?
Can I get Emacs to indicate on the mode-line whether a push is needed, i.e. whether the repo is out of sync with origin?
I've already got it telling me if a commit is needed using vc-status, but that doesn't indicate whether the most recent commit…

Vultan
- 121
- 2
1
vote
3 answers
Emacs doesn't recognize if file is under version control
I noticed I never see in the mode line in which VCS branch I'm currently in, when I open a file in Emacs.
So I tried it with an empty Emacs, created a folder in Eshell, called ~/foo
, and initialized Git with git init inside ~/foo.
Then I have…

ReneFroger
- 3,855
- 22
- 63
0
votes
0 answers
Run a command after vc-git-log-outgoing
I'm trying to fix a problem with this project: https://github.com/domtronn/spaceline-all-the-icons.el
Specifically this code which is supposed to count the number of commits ahead of another branch the current branch is:…

Cameron Ball
- 131
- 2
0
votes
0 answers
Emacs 28.2 VC-git crashes on Mac Studio Ventura
I migrated from a trashcan Intel MacPro running macOS Monterey to a MacStudio running Ventura.
I installed Emacs from https://emacsformacosx.com/, version 28.2. On the Intel MacPro I am using Emacs 26.3.
VC-git is running just fine on Emacs 26.3,…

ovidiu
- 101
- 2
0
votes
1 answer
Modern Emacs keeps opening related file from vc-diff buffer
Initially I opened Lags when navigating vc-root-diff buffer and the cause of slowness was Emacs opening referenced files by diff.
Back then I used Emacs 27.1. Now I'm on Emacs 28.2 and previous solution:
(setq diff-font-lock-syntax 'nil)
doesn't…

gavenkoa
- 3,352
- 19
- 36
0
votes
1 answer
vc-mode doesn't evaluate when mode-line-format is set with setq-default
I've this code in my init.el
(setq-default mode-line-format (list
(propertize " %b " 'face 'bufname)
(propertize (concat " " vc-mode " ") 'face 'gitmode)))
This evaluates vc-mode to…

natto
- 3
- 3