Function: log-view-copy-revision-as-kill

log-view-copy-revision-as-kill is an interactive and byte-compiled function defined in log-view.el.gz.

Signature

(log-view-copy-revision-as-kill)

Documentation

Copy the ID of the revision at point to the kill ring.

If there are marked revisions, copy the IDs of those, separated by spaces.

Probably introduced at or before Emacs version 31.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/vc/log-view.el.gz
(defun log-view-copy-revision-as-kill ()
  "Copy the ID of the revision at point to the kill ring.
If there are marked revisions, copy the IDs of those, separated by spaces."
  (interactive)
  (let ((revisions (log-view-get-marked)))
    (if (length> revisions 1)
        (let ((found (string-join revisions " ")))
          (kill-new found)
          (message "%s" found))
      (if-let* ((rev (or (car revisions) (log-view-current-tag))))
          (progn (kill-new rev)
                 (message "%s" rev))
        (user-error "No revision at point")))))