[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 244baa5 2/3: image-dired: Improve some messages
From: |
Stefan Kangas |
Subject: |
master 244baa5 2/3: image-dired: Improve some messages |
Date: |
Sat, 20 Nov 2021 06:55:44 -0500 (EST) |
branch: master
commit 244baa550beb3ca6f6b87cf86e2dae4465a87cbd
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
image-dired: Improve some messages
* lisp/image-dired.el (image-dired-dir)
(image-dired-create-thumb-1): Improve messages.
(image-dired-rotate-original): Signal 'user-error' instead of 'error'.
---
lisp/image-dired.el | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/lisp/image-dired.el b/lisp/image-dired.el
index 852ef0f..47a44a4 100644
--- a/lisp/image-dired.el
+++ b/lisp/image-dired.el
@@ -520,14 +520,14 @@ Return the last form in BODY."
,@body))
(defun image-dired-dir ()
- "Return the current thumbnails directory (from variable `image-dired-dir').
-Create the thumbnails directory if it does not exist."
+ "Return the current thumbnail directory (from variable `image-dired-dir').
+Create the thumbnail directory if it does not exist."
(let ((image-dired-dir (file-name-as-directory
- (expand-file-name image-dired-dir))))
+ (expand-file-name image-dired-dir))))
(unless (file-directory-p image-dired-dir)
(with-file-modes #o700
(make-directory image-dired-dir t))
- (message "Creating thumbnails directory"))
+ (message "Thumbnail directory created: %s" image-dired-dir))
image-dired-dir))
(defun image-dired-insert-image (file type relief margin)
@@ -743,9 +743,9 @@ and remove the cached thumbnail files between each trial
run.")
(thumbnail-dir (file-name-directory thumbnail-file))
process)
(when (not (file-exists-p thumbnail-dir))
- (message "Creating thumbnail directory")
(with-file-modes #o700
- (make-directory thumbnail-dir t)))
+ (make-directory thumbnail-dir t))
+ (message "Thumbnail directory created: %s" thumbnail-dir))
;; Thumbnail file creation processes begin here and are marshaled
;; in a queue by `image-dired-create-thumb'.
@@ -2013,7 +2013,7 @@ With prefix argument ARG, display image in its original
size."
(cons ?o (expand-file-name file))
(cons ?t image-dired-temp-rotate-image-file))))
(unless (eq 'jpeg (image-type file))
- (error "Only JPEG images can be rotated!"))
+ (user-error "Only JPEG images can be rotated"))
(if (not (= 0 (apply #'call-process
image-dired-cmd-rotate-original-program
nil nil nil
(mapcar (lambda (arg) (format-spec arg spec))