From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#50344: C-x v keybinding for vc-print-branch-log Date: Thu, 07 Oct 2021 10:21:45 +0300 Organization: LINKOV.NET Message-ID: <878rz5pc9i.fsf@mail.linkov.net> References: <87mtoux1ha.fsf@mail.linkov.net> <1f39aa34-6626-3d0b-d764-2c9908787d99@yandex.ru> <87o8998wf4.fsf@mail.linkov.net> <84e4e2ef-6c8d-3645-9e1e-3129981dd45f@yandex.ru> <875yvgvohe.fsf@gnus.org> <87y28burzd.fsf@mail.linkov.net> <87o896kt5k.fsf@gnus.org> <87sfyhj3qw.fsf@mail.linkov.net> <87zgsoctoc.fsf@gnus.org> <59a05468-2309-c6e7-5a2a-51426c208966@yandex.ru> <87tuiv4hvc.fsf@gnus.org> <87fsudsngq.fsf@mail.linkov.net> <87k0jora9d.fsf@gnus.org> <7ba6c699-cfe5-4fa3-92dd-55b1e227aacf@yandex.ru> <874kaptwki.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7436"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (x86_64-pc-linux-gnu) Cc: 50344@debbugs.gnu.org, Lars Ingebrigtsen To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 07 09:36:59 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYNxa-0001nw-H7 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Oct 2021 09:36:58 +0200 Original-Received: from localhost ([::1]:56368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYNxY-0002y3-LS for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Oct 2021 03:36:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYNsp-00035u-AO for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 03:32:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34311) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYNsp-0003xj-05 for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 03:32:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mYNso-0000fg-Tm for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 03:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Oct 2021 07:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50344 X-GNU-PR-Package: emacs Original-Received: via spool by 50344-submit@debbugs.gnu.org id=B50344.16335918892529 (code B ref 50344); Thu, 07 Oct 2021 07:32:02 +0000 Original-Received: (at 50344) by debbugs.gnu.org; 7 Oct 2021 07:31:29 +0000 Original-Received: from localhost ([127.0.0.1]:45856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYNsG-0000ej-MH for submit@debbugs.gnu.org; Thu, 07 Oct 2021 03:31:28 -0400 Original-Received: from relay10.mail.gandi.net ([217.70.178.230]:32993) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYNsE-0000eE-Ta for 50344@debbugs.gnu.org; Thu, 07 Oct 2021 03:31:27 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 72AF2240008; Thu, 7 Oct 2021 07:31:19 +0000 (UTC) In-Reply-To: <874kaptwki.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 13 Sep 2021 10:47:01 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:216609 Archived-At: --=-=-= Content-Type: text/plain > I realized that quite likely many users already rely on 'C-x v s' > and 'C-x v r' to create/switch branches because currently there is > no other quick way to do these frequent actions. OTOH, I don't > believe that 'vc-switch-backend' is used often. So it seems pretty safe > to just create a new prefix key map for 'C-x v b', and rebind 'vc-switch-backend' > to 'C-x v B'. Then leave 'C-x v r' and 'C-x v s' unchanged to give > users time to adopt to the new branch-related prefix map 'C-x v b'. It will take more time to create branch commands due to many problems. So the best what we could do now is to rebind 'vc-switch-backend' from 'C-x v b' to 'C-x v B' in emacs-28 to give time to adapt to new keybinding. 'vc-switch-backend' was announced in NEWS thusly: If a file is registered in multiple backends, you can switch to another one using C-x v b (vc-switch-backend). This does not change any files, it only changes VC's perspective on the file. Use this to pick up changes from CVS while working under RCS locally. So it was intended to switch backends between CVS and RCS. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=vc-switch-backend.patch diff --git a/etc/NEWS b/etc/NEWS index 8b327fac0f..26af52af58 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -3299,6 +3299,10 @@ Setting this to nil inhibits that. ** 'vc-print-branch-log' shows the change log from its root directory. It previously used to use the default directory. +--- +** 'vc-switch-backend' is rebound from 'C-x v b' to 'C-x v B'. +The prefix key 'C-x v b' is reserved for coming branch commands. + --- ** 'project-shell' and 'shell' now use 'pop-to-buffer-same-window'. This is to keep the same behavior as Eshell. diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index b7760e3bba..7455a306bc 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -864,7 +864,8 @@ vc-kill-buffer-hook (defvar vc-prefix-map (let ((map (make-sparse-keymap))) (define-key map "a" #'vc-update-change-log) - (define-key map "b" #'vc-switch-backend) + ;; TODO: Use the prefix key "b" for branch commands. + (define-key map "B" #'vc-switch-backend) (define-key map "d" #'vc-dir) (define-key map "g" #'vc-annotate) (define-key map "G" #'vc-ignore) --=-=-=--