From: Juri Linkov <juri@linkov.net>
To: 63689@debbugs.gnu.org
Subject: bug#63689: 29.0.91; vc-annotate-mode-menu: Cannot open file vc-nil
Date: Wed, 24 May 2023 19:09:40 +0300 [thread overview]
Message-ID: <861qj53kln.fsf@mail.linkov.net> (raw)
0. emacs-29 -Q
1. Eval:
(context-menu-mode)
(setq debug-on-error t)
(require 'vc-annotate)
2. Open any vc-controlled file and type 'C-x v g' (vc-annotate)
3. Click the right mouse button for Context menu with "VC-Annotate" submenu
Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "vc-nil")
vc-find-backend-function(nil revision-granularity)
vc-call-backend(nil revision-granularity)
(eq 'repository (vc-call-backend nil 'revision-granularity))
The error is caused by 'vc-annotate-mode-menu' that contains:
(keymap "VC-Annotate" ...
(Show\ changeset\ diff\ of\ revision\ at\ line
menu-item
"Show changeset diff of revision at line"
vc-annotate-show-changeset-diff-revision-at-line
:enable (eq 'repository (vc-call-backend nil 'revision-granularity))
Note how it tries to use the backend 'nil'.
This is because 'vc-annotate-backend' is evaluated when calling
(require 'vc-annotate) in the *scratch* buffer where it's nil.
Here is the fix for emacs-29:
diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el
index 70057a6aac7..d83660f9d79 100644
--- a/lisp/vc/vc-annotate.el
+++ b/lisp/vc/vc-annotate.el
@@ -330,7 +330,7 @@ vc-annotate-mode-menu
["Show changeset diff of revision at line"
vc-annotate-show-changeset-diff-revision-at-line
:enable
- (eq 'repository (vc-call-backend ,vc-annotate-backend 'revision-granularity))
+ (eq 'repository (vc-call-backend vc-annotate-backend 'revision-granularity))
:help "Visit the diff of the revision at line from its previous revision"]
["Visit revision at line" vc-annotate-find-revision-at-line
:help "Visit the revision identified in the current line"]))
next reply other threads:[~2023-05-24 16:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-24 16:09 Juri Linkov [this message]
2023-05-25 18:33 ` bug#63689: 29.0.91; vc-annotate-mode-menu: Cannot open file vc-nil Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=861qj53kln.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=63689@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).