org-execute-file-search-functions

org-execute-file-search-functions is a variable defined in `org.el'.
Its value is
nil

  • This variable may be risky if used as a file-local variable.

Documentation:
List of functions to execute a file search triggered by a link.

Functions added to this hook must accept a single argument, the
search string that was part of the file link, the part after the
double colon. The function must first check if it would like to
handle this search, for example by checking the `major-mode' or
the file extension. If it decides not to handle this search, it
should just return nil to give other functions a chance. If it
does handle the search, it must return a non-nil value to keep
other functions from trying.

Each function can access the current prefix argument through the
variable `current-prefix-arg'. Note that a single prefix is used
to force opening a link in Emacs, so it may be good to only use a
numeric or double prefix to guide the search function.

In case this is needed, a function in this hook can also restore
the window configuration before `org-open-at-point' was called using:

(set-window-configuration org-window-config-before-follow-link)