Function: image-dired-show-all-from-dir
image-dired-show-all-from-dir is an autoloaded, interactive and
byte-compiled function defined in image-dired.el.gz.
Signature
(image-dired-show-all-from-dir DIRNAME)
Documentation
Make a thumbnail buffer for all images in DIRNAME and display it.
The DIRNAME argument is passed along to dired, and can therefore be
either a string with wildcards or a cons, as described in the
documentation for that function. Refer to it for more details.
If the number of image files in DIR exceeds
image-dired-show-all-from-dir-max-files, ask for confirmation
before creating the thumbnail buffer. If that variable is nil,
never ask for confirmation.
Any file matching image-dired--file-name-regexp is considered an
image file.
Probably introduced at or before Emacs version 31.1.
Key Bindings
Aliases
image-dired
tumme (obsolete since 24.4)
Source Code
;; Defined in /usr/src/emacs/lisp/image/image-dired.el.gz
;;;###autoload
(defun image-dired-show-all-from-dir (dirname)
"Make a thumbnail buffer for all images in DIRNAME and display it.
The DIRNAME argument is passed along to `dired', and can therefore be
either a string with wildcards or a cons, as described in the
documentation for that function. Refer to it for more details.
If the number of image files in DIR exceeds
`image-dired-show-all-from-dir-max-files', ask for confirmation
before creating the thumbnail buffer. If that variable is nil,
never ask for confirmation.
Any file matching `image-dired--file-name-regexp' is considered an
image file."
(interactive "DShow thumbnails for directory: ")
(dired dirname)
(dired-mark-files-regexp (image-dired--file-name-regexp))
(let ((files (dired-get-marked-files nil nil nil t))
(dired-default-directory default-directory))
(cond ((and (null (cdr files)))
(message "No image files in directory"))
((or (not image-dired-show-all-from-dir-max-files)
(<= (length (cdr files)) image-dired-show-all-from-dir-max-files)
(and (> (length (cdr files)) image-dired-show-all-from-dir-max-files)
(y-or-n-p
(format
"Directory contains more than %d image files. Proceed?"
image-dired-show-all-from-dir-max-files))))
(image-dired-display-thumbs)
(let ((inhibit-message t))
(dired-unmark-all-marks))
(pop-to-buffer image-dired-thumbnail-buffer)
(setq default-directory dired-default-directory)
(image-dired--update-header-line))
(t (message "Image-Dired canceled")))))