From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Caldwell Newsgroups: gmane.emacs.bugs 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 Message-ID: <55DFCAE1.1040103@porkrind.org> References: <20150827183246.GA15564@porkrind.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms080507070604000305000803" X-Trace: ger.gmane.org 1440729927 26481 80.91.229.3 (28 Aug 2015 02:45:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Aug 2015 02:45:27 +0000 (UTC) Cc: 21364@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 28 04:45:16 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZV9fE-0003LO-4u for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Aug 2015 04:45:12 +0200 Original-Received: from localhost ([::1]:45761 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZV9fD-0006PW-DW for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Aug 2015 22:45:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZV9f9-0006MN-3r for bug-gnu-emacs@gnu.org; Thu, 27 Aug 2015 22:45:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZV9f5-0008Kg-3M for bug-gnu-emacs@gnu.org; Thu, 27 Aug 2015 22:45:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZV9f4-0008Jo-Py for bug-gnu-emacs@gnu.org; Thu, 27 Aug 2015 22:45:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZV9f4-00088R-D8 for bug-gnu-emacs@gnu.org; Thu, 27 Aug 2015 22:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: David Caldwell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Aug 2015 02:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21364 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 21364-submit@debbugs.gnu.org id=B21364.144072984331180 (code B ref 21364); Fri, 28 Aug 2015 02:45:02 +0000 Original-Received: (at 21364) by debbugs.gnu.org; 28 Aug 2015 02:44:03 +0000 Original-Received: from localhost ([127.0.0.1]:40702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZV9e7-00086p-Dn for submit@debbugs.gnu.org; Thu, 27 Aug 2015 22:44:03 -0400 Original-Received: from sa38.galvanix.net ([98.126.48.38]:43058 helo=kill.porkrind.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZV9e4-00086I-Q2 for 21364@debbugs.gnu.org; Thu, 27 Aug 2015 22:44:01 -0400 Original-Received: from porkrind.org (cpe-76-170-36-134.socal.res.rr.com [76.170.36.134]) by kill.porkrind.org (Postfix) with ESMTPS id EB2425F142; Thu, 27 Aug 2015 19:43:48 -0700 (PDT) Authentication-Results: kill.porkrind.org; dkim=pass (1536-bit key; unprotected) header.d=porkrind.org header.i=@porkrind.org header.b=So6lItLS; dkim-atps=neutral Original-Received: from [10.0.0.10] (black.local [10.0.0.10]) (authenticated bits=0) by porkrind.org (8.14.9/8.14.9/Debian-4) with ESMTP id t7S2hklT000826 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 27 Aug 2015 19:43:46 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=porkrind.org; s=apoptygma; t=1440729827; bh=NflrsGEUV4vEZJpBni5Y30HeRXj5QOIjioFGn7aDlz8=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=So6lItLSFFEg1P49Uvqay+eOnE3+PmGOLkcfzIg/JNm2FoJxYPCIYl8rQKC5jYzFy GpaGl+MWL5cFdJBOGAgrSdNSTGAXvPsPN3DmSMTthaej63alkptcIRkZblgiUeTIk8 n6VGdBrJ8ps3o9m//Z52D2bHfnAIpxwnYaihcp8FEKTohi/DXnazTfpuHUHO498EFo OWT4Tc6+HABtPAwxH+jCIPRshblM9H5ZQBVFisGbvsGGp0CujrNaB5EgHpo X-Enigmail-Draft-Status: N1110 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAQAAAD9CzEMAAAACXBIWXMAAAsTAAALEwEAmpwY AAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+S X8VGAAABiklEQVR42rRYSZIDIQwzLv7/ZXLoEAzeBKG7ag4DRhZeBKQ0Qr5imLWCrKwn0HImc1Mx aAvmmc/cuAT7RMYws6v/gHeb0p4/y5792GJJlLZWOPgsdV5NaRes4Xe4632sLljD7wKv1Ta74H/h MxecN1Rc2TatYcP7zb+6WFfN/zMSHg1Ymuxjrzd+DuLw6Nlekggt1hvr7KK9tRIX85jjM6GTYhfv nzXH3jBdYc4koueBs66M+Xv9O9n5ML4urWssjGeMY3if3bzGSvk30BQ46OOaxJjLCpzPJAzXrOrD z5VFh58TIiwESIiCHNxxwPTy97qDei8YdpVdyYEv6EQcK8n+iTyE/Cn1eoe7HwN+F56oErVSGtJY Q1sR2ehaUHfjvJuv0tL7qAzEbBmfF2IHrVi8zp9N0pZtQZZHOXp/sLW4+hqKvm3iccaPwP3XgnKX n8/YtVeOsnenRG7VCBFlZ5fe3LOyANCVdGAIwDs7tTXGF4hIk15/iAfSgv2UkNFItSszOG3Ha7r0 GQBerhBkHOAzmQAAAABJRU5ErkJggg== User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:40.0) Gecko/20100101 Thunderbird/40.0 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:105900 Archived-At: This is a cryptographically signed message in MIME format. --------------ms080507070604000305000803 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 8/27/15 7:23 PM, Stefan Monnier wrote: >> The motivation comes from the fact that I don't consistently use VC fo= r >> 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 V= C >> to just check again real quick. I could `M-: RET (vc-find-file-hook)` >> but that doesn't roll off the tongue very well. >=20 > Rather than vc-activate, I think you want a more general function, whic= h > *refreshes* the VC state (i.e. the state afterwards may be "inactive" i= f > 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 --------------ms080507070604000305000803 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCC DGAwggYkMIIFDKADAgECAgMM240wDQYJKoZIhvcNAQELBQAwgYwxCzAJBgNVBAYTAklMMRYw FAYDVQQKEw1TdGFydENvbSBMdGQuMSswKQYDVQQLEyJTZWN1cmUgRGlnaXRhbCBDZXJ0aWZp Y2F0ZSBTaWduaW5nMTgwNgYDVQQDEy9TdGFydENvbSBDbGFzcyAxIFByaW1hcnkgSW50ZXJt ZWRpYXRlIENsaWVudCBDQTAeFw0xNTAyMDUwMTUxNDdaFw0xNjAyMDYwMDAzMTNaMEAxGzAZ BgNVBAMMEmRhdmlkQHBvcmtyaW5kLm9yZzEhMB8GCSqGSIb3DQEJARYSZGF2aWRAcG9ya3Jp bmQub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7HjIR+hHVT+RlXpDQWHt fHToCo718aI00KKtR3fVlcFbFTcrkhZd52HvZvoZPLfV2IkSEMZKEnd3f17iqq5KUXGkvQja WWYv5/7T7cIA+uZJb1mJOQ33tj8Q0esRuPs+VJ6r0DE27ddOgbbUxvCaNGY4FrncDsxexl7Y GL1ktB6UMNvap+p8H5P4lDdOMfKyY6Ovdv2BfQB1s952HSyzfcuwtr2Dl7HwHE7ydvY3qBwA RMkXKfdsnMLiJlFtYfUGvoVG22OiyjDI5iSfTd1SSWzULqHYI3LI3JbqeU0KFuzETqYVJu2N PsyFPnob2YHytuUBqOleL0sZLgw/SVUK3QIDAQABo4IC2DCCAtQwCQYDVR0TBAIwADALBgNV HQ8EBAMCBLAwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMEMB0GA1UdDgQWBBRUTg7k NtqALyJsfdStcjsUsot4ZjAfBgNVHSMEGDAWgBRTcu2SnODaywFcfH6WNU7y1LhRgjAdBgNV HREEFjAUgRJkYXZpZEBwb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