Function: majutsu-annotate-visit-file

majutsu-annotate-visit-file is an interactive and natively compiled function defined in majutsu-annotate.el.

Signature

(majutsu-annotate-visit-file)

Documentation

Visit the blob related to the current chunk.

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-annotate.el
(defun majutsu-annotate-visit-file ()
  "Visit the blob related to the current chunk."
  (interactive)
  (let* ((chunk (majutsu-annotate-current-chunk))
         (orig-rev (majutsu-annotate-chunk-orig-rev chunk))
         (orig-line (majutsu-annotate-chunk-orig-line chunk)))
    (let ((file (or (bound-and-true-p majutsu-buffer-blob-path)
                    (and buffer-file-name
                         (file-relative-name buffer-file-name (majutsu-toplevel))))))
      (majutsu-find-file orig-rev file)
      ;; Jump to original line
      (goto-char (point-min))
      (forward-line (1- orig-line)))))