anchor.diff:  
   ;; TODO: Separate package?
   (define-mode file-mode (nyxt/prompt-buffer-mode:prompt-buffer-mode)
  -  "Prompt-buffer mode forthe Nyxt-openable file filtering."
  +  "Prompt-buffer mode for the Nyxt-openable file filtering."
     ((find-file-in-new-buffer t :documentation "If nil, don't open files and directories in a new buffer.")
      (supported-media-types '("mp3" "ogg" "mp4" "flv" "wmv" "webm" "mkv")
                             :type list-of-strings
  
positive.code: Used for file filtering in `find-file'.")
     (find-file-function #'default-find-file-function)))
  
  (defun supported-media-or-directory (filename)
    "Return T if this filename's extension is a media that Nyxt can open (or a directory).
  See `supported-media-types' of `file-mode'."
    (or (and (uiop:directory-pathname-p filename)
             (uiop:directory-exists-p filename))
        (sera:and-let* ((extension (pathname-type filename))
                        (mode (find-submode (current-prompt-buffer) 'file-mode))
                        (extensions (supported-media-types mode)))
          (find extension extensions :test #'string-equal))))
  
  #+linux
  (defvar *xdg-open-program* "xdg-open")
  
  (export-always 'default-find-file-function)
  (defun default-find-file-function (filename &key (new-buffer-p
                                                    (find-file-in-new-buffer
                                                     (find-submode (current-prompt-buffer)
                                                                   'file-mode))))
    "Open FILENAME in Nyxt if supported, or externally otherwise.
  FILENAME is the full path of the file (or directory).
  
  See `supported-media-types' to customize the file types that are opened in
  Nyxt and those that are opened externally.
  
  NEW-BUFFER-P defines whether the file/directory will be open in a new buffer.
  
  Can be used as an `find-file-function'."
    (handler-case
        (if (supported-media-or-directory filename)
            (if new-buffer-p
                (make-buffer-focus :url (format nil "file://~a" filename))
                (buffer-load (format nil "file://~a" filename)))
  
negative.code:                           :key #'prompter:value)))
      (prompt
       :input (namestring default-directory)
       :default-modes '(file-mode)
       :prompt "Open file"
       :sources (list (make-instance 'file-source
                                     :filter-preprocessor #'supported-media-or-directory-filter)))))
  