Function: image-dired-display-thumbs
image-dired-display-thumbs is an autoloaded, interactive and
byte-compiled function defined in image-dired.el.gz.
Signature
(image-dired-display-thumbs &optional ARG APPEND DO-NOT-POP)
Documentation
Display thumbnails of all marked files, in image-dired-thumbnail-buffer.
If a thumbnail image does not exist for a file, it is created on the fly. With prefix argument ARG, display only thumbnail for file at point (this is useful if you have marked some files but want to show another one).
Recommended usage is to split the current frame horizontally so that
you have the Dired buffer in the left window and the
image-dired-thumbnail-buffer buffer in the right window.
With optional argument APPEND, append thumbnail to thumbnail buffer instead of erasing it first.
Optional argument DO-NOT-POP controls if pop-to-buffer should be
used or not. If non-nil, use display-buffer instead of
pop-to-buffer. This is used from functions like
image-dired-next-line-and-display and
image-dired-previous-line-and-display where we do not want the
thumbnail buffer to be selected.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/image/image-dired.el.gz
;;;###autoload
(defun image-dired-display-thumbs (&optional arg append do-not-pop)
"Display thumbnails of all marked files, in `image-dired-thumbnail-buffer'.
If a thumbnail image does not exist for a file, it is created on the
fly. With prefix argument ARG, display only thumbnail for file at
point (this is useful if you have marked some files but want to show
another one).
Recommended usage is to split the current frame horizontally so that
you have the Dired buffer in the left window and the
`image-dired-thumbnail-buffer' buffer in the right window.
With optional argument APPEND, append thumbnail to thumbnail buffer
instead of erasing it first.
Optional argument DO-NOT-POP controls if `pop-to-buffer' should be
used or not. If non-nil, use `display-buffer' instead of
`pop-to-buffer'. This is used from functions like
`image-dired-next-line-and-display' and
`image-dired-previous-line-and-display' where we do not want the
thumbnail buffer to be selected."
(interactive "P" nil dired-mode)
(setq image-dired--generate-thumbs-start (current-time))
(let ((buf (image-dired-create-thumbnail-buffer))
files dired-buf)
(if arg
(setq files (list (dired-get-filename)))
(setq files (dired-get-marked-files)))
(setq dired-buf (current-buffer))
(with-current-buffer buf
(let ((inhibit-read-only t))
(if (not append)
(progn
(setq image-dired--number-of-thumbnails 0)
(erase-buffer))
(goto-char (point-max)))
(dolist (file files)
(when (string-match-p (image-dired--file-name-regexp) file)
(image-dired-insert-thumbnail
(image-dired--get-create-thumbnail-file file) file dired-buf)
(cl-incf image-dired--number-of-thumbnails))))
(if (> image-dired--number-of-thumbnails 0)
(if do-not-pop
(display-buffer buf)
(pop-to-buffer buf))
(message "No images selected"))
(image-dired--line-up-with-method)
(image-dired--update-header-line))))