GNU bug report logs - #63690
29.0.91; New vc commands missing on vc-menu

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Wed, 24 May 2023 16:33:01 UTC

Severity: normal

Found in version 29.0.91

Fixed in version 29.0.60

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 63690 in the body.
You can then email your comments to 63690 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#63690; Package emacs. (Wed, 24 May 2023 16:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> linkov.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 24 May 2023 16:33:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.91; New vc commands missing on vc-menu
Date: Wed, 24 May 2023 19:16:23 +0300
etc/NEWS on emacs-29 contains:

  'vc-print-branch-log' is bound to 'C-x v b l', and new commands are
  'vc-create-branch' ('C-x v b c') and 'vc-switch-branch' ('C-x v b s').

But new commands are not yet added to 'vc-menu-map'.
This patch for emacs-29 fixes this omission:

diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index 02c4a240c6a..402b918fc7d 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -898,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 "Show the change log for branch root"))
+    (bindings--define-key map [vc-switch-branch]
+      '(menu-item "Switch Branch" vc-switch-branch
+		  :help "Switch to the 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63690; Package emacs. (Wed, 24 May 2023 16:52:01 GMT) Full text and rfc822 format available.

Message #8 received at 63690 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 63690 <at> debbugs.gnu.org
Subject: Re: bug#63690: 29.0.91; New vc commands missing on vc-menu
Date: Wed, 24 May 2023 19:51:45 +0300
> From: Juri Linkov <juri <at> linkov.net>
> Date: Wed, 24 May 2023 19:16:23 +0300
> 
> etc/NEWS on emacs-29 contains:
> 
>   'vc-print-branch-log' is bound to 'C-x v b l', and new commands are
>   'vc-create-branch' ('C-x v b c') and 'vc-switch-branch' ('C-x v b s').
> 
> But new commands are not yet added to 'vc-menu-map'.
> This patch for emacs-29 fixes this omission:

Thanks.  This is okay, but the help-echo text "needs work".

> diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
> index 02c4a240c6a..402b918fc7d 100644
> --- a/lisp/vc/vc-hooks.el
> +++ b/lisp/vc/vc-hooks.el
> @@ -898,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 "Show the change log for branch root"))

What is "branch root"?

> +    (bindings--define-key map [vc-switch-branch]
> +      '(menu-item "Switch Branch" vc-switch-branch
> +		  :help "Switch to the branch"))

"the" branch?

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?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63690; Package emacs. (Wed, 24 May 2023 17:33:02 GMT) Full text and rfc822 format available.

Message #11 received at 63690 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 63690 <at> debbugs.gnu.org
Subject: Re: bug#63690: 29.0.91; New vc commands missing on vc-menu
Date: Wed, 24 May 2023 20:31:21 +0300
>> @@ -898,6 +927,15 @@ vc-menu-map
>> +    (bindings--define-key map [vc-print-branch-log]
>> +      '(menu-item "Show Branch History" vc-print-branch-log
>> +		  :help "Show the change log for branch root"))
>
> What is "branch root"?

Probably better to drop the word "root" to e.g.:

  "List the change log for branch"

Then docstring of 'vc-print-branch-log' could be changed too.

>> +    (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".  Then it may need an ellipsis:
"Switch Branch..."

> 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")




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63690; Package emacs. (Wed, 24 May 2023 18:40:02 GMT) Full text and rfc822 format available.

Message #14 received at 63690 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 63690 <at> debbugs.gnu.org
Subject: Re: bug#63690: 29.0.91; New vc commands missing on vc-menu
Date: Wed, 24 May 2023 21:39:48 +0300
> From: Juri Linkov <juri <at> linkov.net>
> Cc: 63690 <at> debbugs.gnu.org
> Date: Wed, 24 May 2023 20:31:21 +0300
> 
> >> @@ -898,6 +927,15 @@ vc-menu-map
> >> +    (bindings--define-key map [vc-print-branch-log]
> >> +      '(menu-item "Show Branch History" vc-print-branch-log
> >> +		  :help "Show the change log for branch root"))
> >
> > 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.

> > 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63690; Package emacs. (Thu, 25 May 2023 06:48:03 GMT) Full text and rfc822 format available.

Message #17 received at 63690 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 63690 <at> debbugs.gnu.org
Subject: Re: bug#63690: 29.0.91; New vc commands missing on vc-menu
Date: Thu, 25 May 2023 09:43:58 +0300
>> > 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)))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63690; Package emacs. (Thu, 25 May 2023 07:51:01 GMT) Full text and rfc822 format available.

Message #20 received at 63690 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 63690 <at> debbugs.gnu.org
Subject: Re: bug#63690: 29.0.91; New vc commands missing on vc-menu
Date: Thu, 25 May 2023 10:50:56 +0300
> From: Juri Linkov <juri <at> linkov.net>
> Cc: 63690 <at> debbugs.gnu.org
> Date: Thu, 25 May 2023 09:43:58 +0300
> 
> These are fixed in the following patch.

Thanks, LGTM.  Please install on the release branch.

> >>   (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")?

Mentioned there, yes.  But maybe it should be described in full in "VC
Change Log"?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63690; Package emacs. (Thu, 25 May 2023 18:28:01 GMT) Full text and rfc822 format available.

Message #23 received at 63690 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 63690 <at> debbugs.gnu.org
Subject: Re: bug#63690: 29.0.91; New vc commands missing on vc-menu
Date: Thu, 25 May 2023 21:25:48 +0300
close 63690 29.0.60
thanks

>> These are fixed in the following patch.
>
> Thanks, LGTM.  Please install on the release branch.
>
>> Maybe vc-print-branch-log could be mentioned
>> directly in (info "(emacs) Branches")?
>
> Mentioned there, yes.  But maybe it should be described in full in "VC
> Change Log"?

Now installed on the release branch.




bug marked as fixed in version 29.0.60, send any further explanations to 63690 <at> debbugs.gnu.org and Juri Linkov <juri <at> linkov.net> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Thu, 25 May 2023 18:28:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 23 Jun 2023 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 301 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.