diff options
| author | Manuel Giraud | 2023-07-29 10:59:32 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2023-08-03 11:42:13 +0300 |
| commit | 7b30e11b2ac5cd360db7ee8b6aed07bd918b93a2 (patch) | |
| tree | 33d760e010f683c5b08d219662baf3745dd7c20a | |
| parent | 9cd02380333aa260e0cb23c1bb06470d223bdbd5 (diff) | |
| download | emacs-7b30e11b2ac5cd360db7ee8b6aed07bd918b93a2.tar.gz emacs-7b30e11b2ac5cd360db7ee8b6aed07bd918b93a2.zip | |
Revert thumbnail naming for 'per-directory' storage method
* lisp/image/image-dired-util.el (image-dired-thumb-name): Revert
to "filename.thumb.jpg" for 'per-directory' storage. (Bug#61394)
* lisp/image/image-dired.el (image-dired-thumbnail-storage): Fix
documentation.
| -rw-r--r-- | lisp/image/image-dired-util.el | 12 | ||||
| -rw-r--r-- | lisp/image/image-dired.el | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/lisp/image/image-dired-util.el b/lisp/image/image-dired-util.el index 3f6880fc807..70911bce45a 100644 --- a/lisp/image/image-dired-util.el +++ b/lisp/image/image-dired-util.el | |||
| @@ -77,8 +77,9 @@ vary: | |||
| 77 | added to the file name. | 77 | added to the file name. |
| 78 | 78 | ||
| 79 | - Otherwise `image-dired-thumbnail-storage' is used to set the | 79 | - Otherwise `image-dired-thumbnail-storage' is used to set the |
| 80 | directory where to store the thumbnail. In this latter case | 80 | directory where to store the thumbnail. In this latter case, |
| 81 | the name given to the thumbnail depends on the value of | 81 | if `image-dired-thumbnail-storage' is set to `image-dired' the |
| 82 | file name given to the thumbnail depends on the value of | ||
| 82 | `image-dired-thumb-naming'. | 83 | `image-dired-thumb-naming'. |
| 83 | 84 | ||
| 84 | See also `image-dired-thumbnail-storage' and | 85 | See also `image-dired-thumbnail-storage' and |
| @@ -99,15 +100,14 @@ See also `image-dired-thumbnail-storage' and | |||
| 99 | (let ((name (if (eq 'sha1-contents image-dired-thumb-naming) | 100 | (let ((name (if (eq 'sha1-contents image-dired-thumb-naming) |
| 100 | (image-dired-contents-sha1 file) | 101 | (image-dired-contents-sha1 file) |
| 101 | ;; Defaults to SHA-1 of file name | 102 | ;; Defaults to SHA-1 of file name |
| 102 | (if (eq 'per-directory image-dired-thumbnail-storage) | 103 | (sha1 file)))) |
| 103 | (sha1 (file-name-nondirectory file)) | ||
| 104 | (sha1 file))))) | ||
| 105 | (cond ((or (eq 'image-dired image-dired-thumbnail-storage) | 104 | (cond ((or (eq 'image-dired image-dired-thumbnail-storage) |
| 106 | ;; Maintained for backwards compatibility: | 105 | ;; Maintained for backwards compatibility: |
| 107 | (eq 'use-image-dired-dir image-dired-thumbnail-storage)) | 106 | (eq 'use-image-dired-dir image-dired-thumbnail-storage)) |
| 108 | (expand-file-name (format "%s.jpg" name) (image-dired-dir))) | 107 | (expand-file-name (format "%s.jpg" name) (image-dired-dir))) |
| 109 | ((eq 'per-directory image-dired-thumbnail-storage) | 108 | ((eq 'per-directory image-dired-thumbnail-storage) |
| 110 | (expand-file-name (format "%s.jpg" name) | 109 | (expand-file-name (format "%s.thumb.jpg" |
| 110 | (file-name-nondirectory file)) | ||
| 111 | (expand-file-name | 111 | (expand-file-name |
| 112 | ".image-dired" | 112 | ".image-dired" |
| 113 | (file-name-directory file))))))))) | 113 | (file-name-directory file))))))))) |
diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el index 96a0c2ef9bc..98596510ec1 100644 --- a/lisp/image/image-dired.el +++ b/lisp/image/image-dired.el | |||
| @@ -174,8 +174,8 @@ computing the SHA-1 of first 4KiB of the image contents (See | |||
| 174 | In both case, a \"jpg\" extension is appended to save as JPEG. | 174 | In both case, a \"jpg\" extension is appended to save as JPEG. |
| 175 | 175 | ||
| 176 | The value of this option is ignored if Image-Dired is customized | 176 | The value of this option is ignored if Image-Dired is customized |
| 177 | to use the Thumbnail Managing Standard. See | 177 | to use the Thumbnail Managing Standard or the per-directory |
| 178 | `image-dired-thumbnail-storage'." | 178 | thumbnails setting. See `image-dired-thumbnail-storage'." |
| 179 | :type '(choice :tag "How to name thumbnail files" | 179 | :type '(choice :tag "How to name thumbnail files" |
| 180 | (const :tag "SHA-1 of the image file name" sha1-filename) | 180 | (const :tag "SHA-1 of the image file name" sha1-filename) |
| 181 | (const :tag "SHA-1 of the image contents" sha1-contents)) | 181 | (const :tag "SHA-1 of the image contents" sha1-contents)) |
| @@ -208,8 +208,8 @@ thumbnails: | |||
| 208 | 208 | ||
| 209 | Set this user option to `per-directory'. | 209 | Set this user option to `per-directory'. |
| 210 | 210 | ||
| 211 | To control the naming of thumbnails for alternatives (2) and (3) | 211 | To control the naming of thumbnails for alternative (2) above, |
| 212 | above, customize the value of `image-dired-thumb-naming'. | 212 | customize the value of `image-dired-thumb-naming'. |
| 213 | 213 | ||
| 214 | To control the default size of thumbnails for alternatives (2) | 214 | To control the default size of thumbnails for alternatives (2) |
| 215 | and (3) above, customize the value of `image-dired-thumb-size'. | 215 | and (3) above, customize the value of `image-dired-thumb-size'. |