bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21364: [PATCH] Add vc-activate (interactive) to activate VC mode on


From: David Caldwell
Subject: bug#21364: [PATCH] Add vc-activate (interactive) to activate VC mode on the current buffer
Date: Thu, 27 Aug 2015 19:43:45 -0700
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:40.0) Gecko/20100101 Thunderbird/40.0

On 8/27/15 7:23 PM, Stefan Monnier wrote:
>> The motivation comes from the fact that I don't consistently use VC for
>> everything. I often pop back and forth to the command line, depending on
>> the situation. This ends up with a lot of "git add" commands being run
>> behind emacs's back. I've been using `M-x revert-buffer` or `C-x C-v`,
>> but both of them seem too harsh for what I really want, which is for VC
>> to just check again real quick. I could `M-: RET (vc-find-file-hook)`
>> but that doesn't roll off the tongue very well.
> 
> Rather than vc-activate, I think you want a more general function, which
> *refreshes* the VC state (i.e. the state afterwards may be "inactive" if
> the file is not under the control of a VCS, for example).

Turns out vc-find-file-hook already deactivates the  VC state--I tested
by doing

   $ git rm --cached test && commit -m 'test'

followed by `M-x vc-activate` and the VC successfully went away on my
open 'test' buffer.

So it sounds like maybe it's just a question of the name?

-David


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]