Function: majutsu-annotate-copy-hash

majutsu-annotate-copy-hash is an interactive and natively compiled function defined in majutsu-annotate.el.

Signature

(majutsu-annotate-copy-hash)

Documentation

Copy the change-id of the current chunk to the kill ring.

When the region is active, then save the region's content instead of the hash, like kill-ring-save would.

Key Bindings

majutsu-annotate-read-only-mode-map M-w

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-annotate.el
(defun majutsu-annotate-copy-hash ()
  "Copy the change-id of the current chunk to the kill ring.

When the region is active, then save the region's content
instead of the hash, like `kill-ring-save' would."
  (interactive)
  (if (use-region-p)
      (call-interactively #'copy-region-as-kill)
    (let* ((chunk (majutsu-annotate-current-chunk))
           (change-id (majutsu-annotate-chunk-orig-rev chunk)))
      (kill-new (message "%s" change-id)))))