Function: hpath:find-program

hpath:find-program is a byte-compiled function defined in hpath.el.

Signature

(hpath:find-program FILENAME)

Documentation

Return one or a list of shell or Lisp commands to execute to display FILENAME.

Return nil if FILENAME is a directory name or an image file that Emacs can display. See also documentation for the function (hpath:get-external-display-alist) and the variable hpath:internal-display-alist.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hpath.el
(defun hpath:find-program (filename)
  "Return one or a list of shell or Lisp commands to execute to display FILENAME.
Return nil if FILENAME is a directory name or an image file that
Emacs can display.  See also documentation for the
function (hpath:get-external-display-alist) and the variable
`hpath:internal-display-alist'."
  (cond ((and (fboundp 'image-mode)
	      (string-match hpath:native-image-suffixes filename))
	 nil)
	((let ((case-fold-search nil))
	   (hpath:match filename hpath:internal-display-alist)))
	((let ((case-fold-search t))
	   (hpath:match filename (hpath:get-external-display-alist))))
	((and (stringp filename) (file-directory-p filename))
	 nil)
	;; 01/21/2019 - RSW commented this next line out since it can
	;; trigger external viewers on many file types that Emacs
	;; displays natively.
	;; (t (hpath:find-file-mailcap filename))
	))