Questions tagged [vc]
46 questions
8
votes
3 answers
Customize vc-mode appearance in mode-line
I use vc-mode to show information about the current VC state in my mode line, like this:
(setq mode-line-format '(… (vc-mode vc-mode) …))
However, I find the default format of vc-mode pretty verbose. Notably, it includes the name of the current VC…
user227
7
votes
1 answer
Is there a way to revert only certain lines from a diff hunk?
I use the builtin VC package and it's very nice that when I do a diff of changes in the current file then I can revert any hunk in the diff quickly with C-a
But sometimes I don't want to revert the whole hunk, only certain lines and keep other…

Tom
- 1,190
- 7
- 16
6
votes
1 answer
How do I visit a file on a different branch?
I'm aware of C-x v ~ which allows you to see a different revision of the current file, but I would like to visit the file on another branch.
Is this possible with magit, VC or git-timemachine?

alecvn
- 419
- 2
- 12
6
votes
1 answer
Indicate whether file has uncommited changes in mode line
In my mode line I can see if a buffer has unsaved changes (**- or a red x in my case, since I am using smart-mode-line).
Is there a similar way to display whether or not the file visited by the current buffer has uncommitted changes in Git or…

elethan
- 4,755
- 3
- 29
- 56
4
votes
1 answer
How do I do a `git add` with vc-git?
I want to stage a file or a hunk using vc-git (the vc system that comes with Emacs). How do I do this?
(To clarify, I made modifications on a file that is already (registered) in git. I would like to stage the new modifications made. How do I do…

Debajit
- 288
- 2
- 10
4
votes
2 answers
How to change options passed to git vc-annotate?
I have a hard time using vc-annotate (my version control system is git), because the output is not very userfriendly, as it displays long filenames in a separate column in the buffer, which take up half of my screen. Apart from that it takes ages…

Max
- 311
- 2
- 11
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
0 answers
Is there a more async or lazy vc-mode?
Question
Does a "lazy" or "asynchronous" vc mode exist?
Background
Emacs vc mode is designed on the assumption that the version control backend is fast. Much of the core vc features wants the version control status information immediately. For…

MattArmstrong
- 193
- 8
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
2 answers
VC status behavior in ibuffer-vc
I use ibuffer-vc, a replacement for list-buffer that displays the VC status of the listed files. I noted that the VC status stays as "edited" even after I push my changes. That is, the VC status does not differentiate between the following two…

falsum
- 145
- 5
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 resolve TRAMP spamming empty messages
Connecting to a remote machine with tramp that may have VC (subversion) related
files, I tend to see a large number of repeated messages in the *Messages*
buffer. For example:
Type "q" in help window to restore previous buffer.
[2 times]
Mark…

kballou
- 123
- 1
- 1
- 9
2
votes
1 answer
Disable VC for SVN in exclusive-locking mode
I have Subversion exclusive-locking enabled to increase SVN performance. If I commit a file the svn command line client opens Emacs so I can enter a commit message. But Emacs VC tries to determine the SVN status of the commit message file…

holger
- 23
- 3
2
votes
2 answers
Discarding modified hunk at current position
I'd like to discard modified hunks (and ideally, view the diff before) basing on the current buffer position.
I have diff-hl so that it's quite obvious which part of a buffer are modified. Now, how to view the diff for the current hunk and/or…

adamw
- 123
- 4