diff options
| author | Stefan Kangas | 2021-11-20 11:09:23 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2021-11-20 12:55:37 +0100 |
| commit | 244baa550beb3ca6f6b87cf86e2dae4465a87cbd (patch) | |
| tree | 83043f8ae65a83b09a9ce12011301fc159cfd45e | |
| parent | 67e06d692a655985f9e7406e81d717639938427b (diff) | |
| download | emacs-244baa550beb3ca6f6b87cf86e2dae4465a87cbd.tar.gz emacs-244baa550beb3ca6f6b87cf86e2dae4465a87cbd.zip | |
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'.
| -rw-r--r-- | lisp/image-dired.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 852ef0f1035..47a44a4a60e 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el | |||
| @@ -520,14 +520,14 @@ Return the last form in BODY." | |||
| 520 | ,@body)) | 520 | ,@body)) |
| 521 | 521 | ||
| 522 | (defun image-dired-dir () | 522 | (defun image-dired-dir () |
| 523 | "Return the current thumbnails directory (from variable `image-dired-dir'). | 523 | "Return the current thumbnail directory (from variable `image-dired-dir'). |
| 524 | Create the thumbnails directory if it does not exist." | 524 | Create the thumbnail directory if it does not exist." |
| 525 | (let ((image-dired-dir (file-name-as-directory | 525 | (let ((image-dired-dir (file-name-as-directory |
| 526 | (expand-file-name image-dired-dir)))) | 526 | (expand-file-name image-dired-dir)))) |
| 527 | (unless (file-directory-p image-dired-dir) | 527 | (unless (file-directory-p image-dired-dir) |
| 528 | (with-file-modes #o700 | 528 | (with-file-modes #o700 |
| 529 | (make-directory image-dired-dir t)) | 529 | (make-directory image-dired-dir t)) |
| 530 | (message "Creating thumbnails directory")) | 530 | (message "Thumbnail directory created: %s" image-dired-dir)) |
| 531 | image-dired-dir)) | 531 | image-dired-dir)) |
| 532 | 532 | ||
| 533 | (defun image-dired-insert-image (file type relief margin) | 533 | (defun image-dired-insert-image (file type relief margin) |
| @@ -743,9 +743,9 @@ and remove the cached thumbnail files between each trial run.") | |||
| 743 | (thumbnail-dir (file-name-directory thumbnail-file)) | 743 | (thumbnail-dir (file-name-directory thumbnail-file)) |
| 744 | process) | 744 | process) |
| 745 | (when (not (file-exists-p thumbnail-dir)) | 745 | (when (not (file-exists-p thumbnail-dir)) |
| 746 | (message "Creating thumbnail directory") | ||
| 747 | (with-file-modes #o700 | 746 | (with-file-modes #o700 |
| 748 | (make-directory thumbnail-dir t))) | 747 | (make-directory thumbnail-dir t)) |
| 748 | (message "Thumbnail directory created: %s" thumbnail-dir)) | ||
| 749 | 749 | ||
| 750 | ;; Thumbnail file creation processes begin here and are marshaled | 750 | ;; Thumbnail file creation processes begin here and are marshaled |
| 751 | ;; in a queue by `image-dired-create-thumb'. | 751 | ;; in a queue by `image-dired-create-thumb'. |
| @@ -2013,7 +2013,7 @@ With prefix argument ARG, display image in its original size." | |||
| 2013 | (cons ?o (expand-file-name file)) | 2013 | (cons ?o (expand-file-name file)) |
| 2014 | (cons ?t image-dired-temp-rotate-image-file)))) | 2014 | (cons ?t image-dired-temp-rotate-image-file)))) |
| 2015 | (unless (eq 'jpeg (image-type file)) | 2015 | (unless (eq 'jpeg (image-type file)) |
| 2016 | (error "Only JPEG images can be rotated!")) | 2016 | (user-error "Only JPEG images can be rotated")) |
| 2017 | (if (not (= 0 (apply #'call-process image-dired-cmd-rotate-original-program | 2017 | (if (not (= 0 (apply #'call-process image-dired-cmd-rotate-original-program |
| 2018 | nil nil nil | 2018 | nil nil nil |
| 2019 | (mapcar (lambda (arg) (format-spec arg spec)) | 2019 | (mapcar (lambda (arg) (format-spec arg spec)) |