Function: ghostel-find-file-at-point
ghostel-find-file-at-point is an interactive and natively compiled
function defined in ghostel-links.el.
Signature
(ghostel-find-file-at-point)
Documentation
Open the hyperlink at point, or fall back to find-file-at-point.
A detected file reference opens at its recorded line and column even
when the path is split across soft-wrapped rows, which plain ffap
resolves to only the fragment before the row break. A detected
file deleted since detection falls back as well.
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel-links.el
(defun ghostel-find-file-at-point ()
"Open the hyperlink at point, or fall back to `find-file-at-point'.
A detected file reference opens at its recorded line and column even
when the path is split across soft-wrapped rows, which plain `ffap'
resolves to only the fragment before the row break. A detected
file deleted since detection falls back as well."
(interactive)
(let* ((uri (ghostel--link-uri-at-point))
(file (and uri
(string-match ghostel--fileref-regex uri)
(match-string 1 uri))))
(if (and uri (or (not file) (file-exists-p file)))
(ghostel--open-link uri)
(require 'ffap)
(call-interactively #'find-file-at-point))))