From 7ec31d32222cdad695bc8324414880be5ca20201 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20M=C3=BCnster?= Date: Fri, 16 Sep 2022 02:21:22 +0200 Subject: [PATCH] image-dired: Fix thumbnail options for gm * lisp/image/image-dired-external.el (image-dired-cmd-create-standard-thumbnail-options): Fix options for "gm" (GraphicsMagick). (Bug#52200) --- lisp/image/image-dired-external.el | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lisp/image/image-dired-external.el b/lisp/image/image-dired-external.el index 223d881bcfa..3e3a9a44431 100644 --- a/lisp/image/image-dired-external.el +++ b/lisp/image/image-dired-external.el @@ -108,8 +108,8 @@ with the information required by the Thumbnail Managing Standard." "-text" "b" "Thumb::URI" "file://%f" "%q" "%t") "Arguments for `image-dired-cmd-pngcrush-program'. -Available format specifiers are the same as in -`image-dired-cmd-create-thumbnail-options', with %q for a +The available %-format specifiers are the same as in +`image-dired-cmd-create-thumbnail-options', with \"%q\" for a temporary file name (typically generated by pnqnq)." :version "26.1" :type '(repeat (string :tag "Argument"))) @@ -128,20 +128,20 @@ Available format specifiers are described in :link '(url-link "man:optipng(1)")) (defcustom image-dired-cmd-create-standard-thumbnail-options - (append '("-size" "%wx%h" "%f[0]") - (unless (or image-dired-cmd-pngcrush-program - image-dired-cmd-pngnq-program) - (list - "-set" "Thumb::MTime" "%m" - "-set" "Thumb::URI" "file://%f" - "-set" "Description" "Thumbnail of file://%f" - "-set" "Software" (emacs-version))) - '("-thumbnail" "%wx%h>" "png:%t")) + (let ((opts (list + "-size" "%wx%h" "%f[0]" + "-set" "Thumb::MTime" "%m" + "-set" "Thumb::URI" "file://%f" + "-set" "Description" "Thumbnail of file://%f" + "-set" "Software" (emacs-version) + "-thumbnail" "%wx%h>" "png:%t"))) + (if (executable-find "gm") (cons "convert" opts) opts)) "Options for creating thumbnails according to the Thumbnail Managing Standard. -Available format specifiers are the same as in -`image-dired-cmd-create-thumbnail-options', with %m for file modification time." - :version "26.1" - :type '(repeat (string :tag "Argument"))) +The available %-format specifiers are the same as in +`image-dired-cmd-create-thumbnail-options', with \"%m\" for file +modification time." + :type '(repeat (string :tag "Argument")) + :version "29.1") (defcustom image-dired-cmd-rotate-original-program "jpegtran" "Executable used to rotate original image. -- 2.39.2