From 89084a193ef5bef813d9f9f5640a83882371beb9 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 15 Sep 2022 23:56:11 +0200 Subject: [PATCH] Improve image-dired-display-properties-format * lisp/image/image-dired.el (image-dired-display-properties-format): Change default format, improve docstring and add :safe property --- etc/NEWS | 6 ++++++ lisp/image/image-dired.el | 19 ++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 72c330f5f77..e2b5f5fde37 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2093,6 +2093,12 @@ next image. This replaces the message most navigation commands in the thumbnail buffer used to show at the bottom of the screen. +--- +*** 'image-dired-display-properties-format' default has changed. +If you prefer the old format, add this to your Init file: + + (setopt image-dired-display-properties-format "%b: %f (%t): %c") + +++ *** 'image-dired-show-all-from-dir-max-files' increased to 1000. This user option controls asking for confirmation when starting diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el index a7ca60dd37c..e25241274c1 100644 --- a/lisp/image/image-dired.el +++ b/lisp/image/image-dired.el @@ -293,12 +293,21 @@ For more information, see the documentation for `image-dired-toggle-movement-tracking'." :type 'boolean) -(defcustom image-dired-display-properties-format "%b: %f (%t): %c" +(defcustom image-dired-display-properties-format "%-40f %b %t %c" "Display format for thumbnail properties. -%b is replaced with associated Dired buffer name, %f with file -name (without path) of original image file, %t with the list of -tags and %c with the comment." - :type 'string) +This is used for the header line in the Image-Dired buffer. + +The following %-specs are replaced by `format-spec' before +displaying: + + \"%b\" The associated Dired buffer name. + \"%f\" The file name (without a directory) of the + original image file. + \"%t\" The list of tags (from the Image-Dired database). + \"%c\" The comment (from the Image-Dired database)." + :type 'string + :safe #'stringp + :version "29.1") (defcustom image-dired-external-viewer ;; TODO: Use mailcap, dired-guess-shell-alist-default, -- 2.39.2