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#63690: 29.0.91; New vc commands missing on vc-menu Date: Thu, 25 May 2023 09:43:58 +0300 Organization: LINKOV.NET Message-ID: <86pm6o3o7l.fsf@mail.linkov.net> References: <86cz2q404g.fsf@mail.linkov.net> <834jo1oeou.fsf@gnu.org> <86cz2pzlee.fsf@mail.linkov.net> <83ttw1mv4b.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7465"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 63690@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 25 08:49:03 2023 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 1q24mV-0001hJ-7v for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 May 2023 08:49:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q24m6-0004BI-6w; Thu, 25 May 2023 02:48:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q24lh-00047x-66 for bug-gnu-emacs@gnu.org; Thu, 25 May 2023 02:48:13 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q24lZ-0000Wm-GI for bug-gnu-emacs@gnu.org; Thu, 25 May 2023 02:48:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q24lX-0006V7-7n for bug-gnu-emacs@gnu.org; Thu, 25 May 2023 02:48:03 -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, 25 May 2023 06:48:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63690 X-GNU-PR-Package: emacs Original-Received: via spool by 63690-submit@debbugs.gnu.org id=B63690.168499725624822 (code B ref 63690); Thu, 25 May 2023 06:48:03 +0000 Original-Received: (at 63690) by debbugs.gnu.org; 25 May 2023 06:47:36 +0000 Original-Received: from localhost ([127.0.0.1]:45752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q24l5-0006SB-Hl for submit@debbugs.gnu.org; Thu, 25 May 2023 02:47:36 -0400 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:44305) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q24kx-0006RY-LJ for 63690@debbugs.gnu.org; Thu, 25 May 2023 02:47:29 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 235A9C0008; Thu, 25 May 2023 06:47:20 +0000 (UTC) In-Reply-To: <83ttw1mv4b.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 24 May 2023 21:39:48 +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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262341 Archived-At: >> > What is "branch root"? >> >> Probably better to drop the word "root" to e.g.: >> >> "List the change log for branch" > > This prompts for the branch to log, right? Then the menu item should > ends in a "...", and the help text should be > > "List the change log for a branch" > >> Then docstring of 'vc-print-branch-log' could be changed too. > > Yes, and it should say that the command prompts for the branch to log. > >> >> + (bindings--define-key map [vc-switch-branch] >> >> + '(menu-item "Switch Branch" vc-switch-branch >> >> + :help "Switch to the branch")) >> > >> > "the" branch? >> >> Maybe "the selected branch". > > I think > > "Switch to another branch" > >> Then it may need an ellipsis: >> "Switch Branch..." > > Yes. These are fixed in the following patch. >> > Also, AFAICT these commands are not described in the manual. If they >> > are important enough to be on the menu bar, I think we should mention >> > them in the manual as well, no? >> >> They are mentioned briefly in >> >> (info "(emacs) Creating Branches") >> (info "(emacs) Switching Branches") >> (info "(emacs) Editing VC Commands") > > Mentioned, but not indexed. Please always index every command > described in the manual, both its name and its key binding (if any). > This is necessary to allow users to find the description of each > command quickly and easily. > > Also, vc-print-branch-log is not really described, it's just used in > an unrelated example of using a different feature. I can't find an existing Info node to document vc-print-branch-log. (info "(emacs) Branches") has such submenus: * Menu: * Switching Branches:: How to get to another existing branch. * Pulling / Pushing:: Receiving/sending changes from/to elsewhere. * Merging:: Transferring changes between branches. * Creating Branches:: How to start a new branch. Maybe vc-print-branch-log could be mentioned directly in (info "(emacs) Branches")? diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 7d49e28d11f..2a81b9b6cc6 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1523,6 +1523,8 @@ Switching Branches Mercurial, command @kbd{hg update} is used to switch to another branch. +@kindex C-x v b s +@findex vc-switch-branch The VC command to switch to another branch in the current directory is @kbd{C-x v b s @var{branch-name} @key{RET}} (@code{vc-switch-branch}). @@ -1673,6 +1675,8 @@ Creating Branches if the current revision is 2.5, the branch ID should be 2.5.1, 2.5.2, and so on, depending on the number of existing branches at that point. +@kindex C-x v b c +@findex vc-create-branch This procedure will not work for distributed version control systems like git or Mercurial. For those systems you should use the command @code{vc-create-branch} (@kbd{C-x v b c}) instead. diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index e242d1e48e2..05ad45d93e8 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -897,6 +927,15 @@ vc-menu-map (bindings--define-key map [vc-create-tag] '(menu-item "Create Tag" vc-create-tag :help "Create version tag")) + (bindings--define-key map [vc-print-branch-log] + '(menu-item "Show Branch History..." vc-print-branch-log + :help "List the change log for a branch")) + (bindings--define-key map [vc-switch-branch] + '(menu-item "Switch Branch..." vc-switch-branch + :help "Switch to another branch")) + (bindings--define-key map [vc-create-branch] + '(menu-item "Create Branch..." vc-create-branch + :help "Make a new branch")) (bindings--define-key map [separator1] menu-bar-separator) (bindings--define-key map [vc-annotate] '(menu-item "Annotate" vc-annotate diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 91d3f6f70d3..915ba1bad7a 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2851,7 +2851,8 @@ vc-print-root-log ;;;###autoload (defun vc-print-branch-log (branch) - "Show the change log for BRANCH root in a window." + "Show the change log for BRANCH in a window. +The command prompts for the branch to log." (interactive (let* ((backend (vc-responsible-backend default-directory)) (rootdir (vc-call-backend backend 'root default-directory)))