Function: vc-annotate-show-log-revision-at-line
vc-annotate-show-log-revision-at-line is an interactive and
byte-compiled function defined in vc-annotate.el.gz.
Signature
(vc-annotate-show-log-revision-at-line)
Documentation
Visit the log of the revision at line.
If the VC backend supports it, only show the log entry for the revision. If a *vc-change-log* buffer exists and already shows a log for the file in question, search for the log entry required and move point.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc-annotate.el.gz
(defun vc-annotate-show-log-revision-at-line ()
"Visit the log of the revision at line.
If the VC backend supports it, only show the log entry for the revision.
If a *vc-change-log* buffer exists and already shows a log for
the file in question, search for the log entry required and move point."
(interactive)
(if (not (equal major-mode 'vc-annotate-mode))
(message "Cannot be invoked outside of a vc annotate buffer")
(let ((rev-at-line (vc-annotate-extract-revision-at-line)))
(if (not rev-at-line)
(message "Cannot extract revision number from the current line")
(let ((backend vc-annotate-backend)
(log-buf (get-buffer "*vc-change-log*"))
;; No need to follow renames: we specify the historical file name.
vc-git-print-log-follow
pos)
(if (and
log-buf
;; Look for a log buffer that already displays the correct file.
(with-current-buffer log-buf
(and (eq backend log-view-vc-backend)
(null (cdr log-view-vc-fileset))
(string= (car log-view-vc-fileset) (cdr rev-at-line))
;; Check if the entry we require can be found.
(vc-call-backend
backend 'show-log-entry (car rev-at-line))
(setq pos (point)))))
(progn
(pop-to-buffer log-buf)
(goto-char pos))
;; Ask the backend to display a single log entry.
(vc-print-log-internal
vc-annotate-backend (list (cdr rev-at-line))
(car rev-at-line) t 1)))))))