image files. This creates thumbnails for all the images in that
directory, and displays them all in the thumbnail buffer. The
thumbnails are generated in the background and are loaded as they
-become available. This command asks for confirmation if the number of
-image files exceeds @code{image-dired-show-all-from-dir-max-files}.
+become available.
With point in the thumbnail buffer, you can type @key{RET}
(@code{image-dired-display-thumbnail-original-image}) to display a
the thumbnail view, and will create a bookmark that opens the current
directory in Image-Dired.
++++
+*** 'image-dired-show-all-from-dir-max-files' has been increased to 500.
+This option controls asking for confirmation when starting Image-Dired
+in a directory with many files. However, Image-Dired creates
+thumbnails in the background these days, so this is not as important
+as it used to be, back when entering a large directory could lock up
+Emacs for tens of seconds. In addition, you can now customize this
+option to nil to disable this confirmation completely.
+
** Dired
---
:type 'string
:version "29.1")
-(defcustom image-dired-show-all-from-dir-max-files 100
+(defcustom image-dired-show-all-from-dir-max-files 500
"Maximum number of files in directory before prompting.
-If there are more files than this in a selected directory, the
-`image-dired-show-all-from-dir' command will show a prompt."
- :type 'integer
+
+If there are more image files than this in a selected directory,
+the `image-dired-show-all-from-dir' command will ask for
+confirmation before creating the thumbnail buffer. If this
+variable is nil, it will never ask."
+ :type '(choice integer
+ (const :tag "Disable warning" nil))
:version "29.1")
(defvar image-dired-debug nil
;;;###autoload
(defun image-dired-show-all-from-dir (dir)
- "Make a preview buffer for all images in DIR and display it.
-If the number of files in DIR matching `image-file-name-regexp'
-exceeds `image-dired-show-all-from-dir-max-files', a warning will be
-displayed."
+ "Make a thumbnail buffer for all images in DIR and display it.
+Any file matching `image-file-name-regexp' is considered an image
+file.
+
+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."
(interactive "DImage Dired: ")
(dired dir)
(dired-mark-files-regexp (image-file-name-regexp))
(let ((files (dired-get-marked-files)))
- (if (or (<= (length files) image-dired-show-all-from-dir-max-files)
+ (if (or (not image-dired-show-all-from-dir-max-files)
+ (<= (length files) image-dired-show-all-from-dir-max-files)
(and (> (length files) image-dired-show-all-from-dir-max-files)
(y-or-n-p
(format
(defun image-dired-bookmark-jump (bookmark)
"Default bookmark handler for Image-Dired buffers."
;; User already cached thumbnails, so disable any checking.
- (let ((image-dired-show-all-from-dir-max-files most-positive-fixnum))
+ (let ((image-dired-show-all-from-dir-max-files nil))
(image-dired (bookmark-prop-get bookmark 'location))
;; TODO: Go to the bookmarked file, if it exists.
;; (bookmark-prop-get bookmark 'image-dired-file)