Function: browse-url-of-dired-file

browse-url-of-dired-file is an autoloaded, interactive and byte-compiled function defined in browse-url.el.gz.

Signature

(browse-url-of-dired-file)

Documentation

In Dired, ask a WWW browser to display the file named on this line.

Probably introduced at or before Emacs version 26.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/net/browse-url.el.gz
;;;###autoload
(defun browse-url-of-dired-file ()
  "In Dired, ask a WWW browser to display the file named on this line."
  (interactive)
  (let ((tem (dired-get-filename t t))
        ;; Some URL handlers open files in Emacs.  We want to always
        ;; open in a browser, so disable those.
        (browse-url-default-handlers nil))
    (if tem
	(browse-url-of-file (expand-file-name tem))
      (error "No file on this line"))))