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: Wed, 06 Oct 2021 10:29:18 +0300 Organization: LINKOV.NET Message-ID: <87fstevcfl.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> <85dfa858-091b-80df-b9d1-bd1136c2b91e@yandex.ru> <878rz72wqg.fsf@mail.linkov.net> <30b7d470-26b1-7d7a-2d43-9e85059c1fc5@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30523"; 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 , Filipp Gunbin To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 06 09:41:18 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 1mY1YE-0007jv-Gw for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Oct 2021 09:41:18 +0200 Original-Received: from localhost ([::1]:51586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mY1YC-0005kS-Dy for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Oct 2021 03:41:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mY1Xy-0005hG-Ow for bug-gnu-emacs@gnu.org; Wed, 06 Oct 2021 03:41:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59061) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mY1Xy-0002zR-H5 for bug-gnu-emacs@gnu.org; Wed, 06 Oct 2021 03:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mY1Xy-00026p-ER for bug-gnu-emacs@gnu.org; Wed, 06 Oct 2021 03:41: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: Wed, 06 Oct 2021 07:41: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.16335060588079 (code B ref 50344); Wed, 06 Oct 2021 07:41:02 +0000 Original-Received: (at 50344) by debbugs.gnu.org; 6 Oct 2021 07:40:58 +0000 Original-Received: from localhost ([127.0.0.1]:42372 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mY1Xu-00026F-Dn for submit@debbugs.gnu.org; Wed, 06 Oct 2021 03:40:58 -0400 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:42739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mY1Xr-00025n-Oi for 50344@debbugs.gnu.org; Wed, 06 Oct 2021 03:40:57 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id A2663FF808; Wed, 6 Oct 2021 07:40:47 +0000 (UTC) In-Reply-To: <30b7d470-26b1-7d7a-2d43-9e85059c1fc5@yandex.ru> (Dmitry Gutov's message of "Wed, 6 Oct 2021 03:37: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:216522 Archived-At: >>> The command could have a mode for specifying START-POINT, so for Git the >>> command becomes "git checkout -b new-branch-name START-POINT". This >>> could be on C-u (unless there're other frequent "customization" cases). >> The existing API method has no argument for START-POINT. >> Maybe every backend could handle its prefix arg directly >> from current-prefix-arg? For example, >> (defun vc-git-create-tag (dir name branchp) >> (if current-prefix-arg (completion-read "Start point: ") ... > > Maybe we should add a new argument, an optional one. Then backends which > don't support it can continue working without 'C-u' (we can make sure to > call them with appropriate number of arguments) but will obviously fail > when passed an extra argument. We could even catch the error and report > that the backend doesn't support this feature. We need to add new optional arguments to another VC-API methods anyway, e.g. (vc-call-backend backend 'revision-completion-table files) needs a new argument 'branchp' to avoid the recently added hack 'vc-git-revision-complete-only-branches' that can't be used in the new command 'vc-switch-branch' by 'vc-read-revision' (that also needs a new argument 'branchp'). > But maybe the command should prompt for START-POINT by default: one doesn't > create branches that often to be bothered by an extra RET, and it can be > useful to verify the branch you are branching off of every time you do > it. That would be my preferred behavior. And the implementation could be > the same if we manage to treat RET as unspecified START-POINT. Prompting for START-POINT by default is ok. The problem is how to handle existing backends after adding new optional arguments to VC-API methods. Maybe first to call with an extra argument, catch an error, then call again without an extra argument?