From: Juri Linkov <juri@linkov.net>
To: 33295@debbugs.gnu.org
Subject: bug#33295: Unhandled error in log-view-find-revision
Date: Tue, 06 Nov 2018 23:27:22 +0200 [thread overview]
Message-ID: <87d0rhyk05.fsf@mail.linkov.net> (raw)
0. emacs -Q
1. in the root of a vc-controlled directory:
C-x v L ;; vc-print-root-log
2. on any revision
f ;; log-view-find-revision
fails with an error:
vc-find-backend-function: Cannot open load file: No such file or directory, vc-nil
and with non-nil ‘debug-on-error’ shows a backtrace that refers to ‘require(vc-nil)’.
This is because the value of ‘log-view-vc-fileset’ in that *vc-change-log* buffer
is a directory.
This patch changes it to display a nicer error:
diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el
index 6ff50dcde5..bfb31ccdab 100644
--- a/lisp/vc/log-view.el
+++ b/lisp/vc/log-view.el
@@ -517,8 +517,10 @@ log-view-find-revision
If called interactively, visit the version at point."
(interactive "d")
(unless log-view-per-file-logs
- (when (> (length log-view-vc-fileset) 1)
- (error "Multiple files shown in this buffer, cannot use this command here")))
+ (when (or (> (length log-view-vc-fileset) 1)
+ (null (car log-view-vc-fileset))
+ (file-directory-p (car log-view-vc-fileset)))
+ (user-error "Multiple files shown in this buffer, cannot use this command here")))
(save-excursion
(goto-char pos)
(switch-to-buffer (vc-find-revision (if log-view-per-file-logs
@@ -561,8 +563,10 @@ log-view-annotate-version
If called interactively, annotate the version at point."
(interactive "d")
(unless log-view-per-file-logs
- (when (> (length log-view-vc-fileset) 1)
- (error "Multiple files shown in this buffer, cannot use this command here")))
+ (when (or (> (length log-view-vc-fileset) 1)
+ (null (car log-view-vc-fileset))
+ (file-directory-p (car log-view-vc-fileset)))
+ (user-error "Multiple files shown in this buffer, cannot use this command here")))
(save-excursion
(goto-char pos)
(vc-annotate (if log-view-per-file-logs
next reply other threads:[~2018-11-06 21:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-06 21:27 Juri Linkov [this message]
2018-11-07 22:42 ` bug#33295: Unhandled error in log-view-find-revision 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d0rhyk05.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=33295@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.