From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: contovob@tcd.ie, stefankangas@gmail.com, 61394@debbugs.gnu.org
Subject: bug#61394: 30.0.50; [PATCH] Image-dired thumb name based on content
Date: Sat, 29 Jul 2023 18:50:27 +0200 [thread overview]
Message-ID: <87cz0airvw.fsf@ledu-giraud.fr> (raw)
In-Reply-To: <83bkfvm2ew.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 29 Jul 2023 13:34:47 +0300")
[-- Attachment #1: Type: text/plain, Size: 500 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Manuel Giraud <manuel@ledu-giraud.fr>
>> Cc: stefankangas@gmail.com, contovob@tcd.ie, 61394@debbugs.gnu.org
>> Date: Sat, 29 Jul 2023 11:51:19 +0200
>>
>> So I think that this patch does that but then 5efc7b22cec should be
>> reverted.
>>
>> I'm not so sure about the 'image-dired-thumb-name' docstring.
>
> Thanks, will look into that soon.
Here is a new version of this patch. I missed some precision in a
docstring in the previous one (sorry).
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Revert-thumbnail-naming-for-per-directory-storage-me.patch --]
[-- Type: text/x-patch, Size: 3679 bytes --]
From 9db8988412a8d2463d3d44ff23b80e545e9e5b19 Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel@ledu-giraud.fr>
Date: Sat, 29 Jul 2023 10:59:32 +0200
Subject: [PATCH] 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.
* lisp/image/image-dired.el (image-dired-thumbnail-storage): Fix
documentation.
---
lisp/image/image-dired-util.el | 12 ++++++------
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 @@ image-dired-thumb-name
added to the file name.
- Otherwise `image-dired-thumbnail-storage' is used to set the
- directory where to store the thumbnail. In this latter case
- the name given to the thumbnail depends on the value of
+ directory where to store the thumbnail. In this latter case,
+ if `image-dired-thumbnail-storage' is set to `image-dired' the
+ file name given to the thumbnail depends on the value of
`image-dired-thumb-naming'.
See also `image-dired-thumbnail-storage' and
@@ -99,15 +100,14 @@ image-dired-thumb-name
(let ((name (if (eq 'sha1-contents image-dired-thumb-naming)
(image-dired-contents-sha1 file)
;; Defaults to SHA-1 of file name
- (if (eq 'per-directory image-dired-thumbnail-storage)
- (sha1 (file-name-nondirectory file))
- (sha1 file)))))
+ (sha1 file))))
(cond ((or (eq 'image-dired image-dired-thumbnail-storage)
;; Maintained for backwards compatibility:
(eq 'use-image-dired-dir image-dired-thumbnail-storage))
(expand-file-name (format "%s.jpg" name) (image-dired-dir)))
((eq 'per-directory image-dired-thumbnail-storage)
- (expand-file-name (format "%s.jpg" name)
+ (expand-file-name (format "%s.thumb.jpg"
+ (file-name-nondirectory file))
(expand-file-name
".image-dired"
(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 @@ image-dired-thumb-naming
In both case, a \"jpg\" extension is appended to save as JPEG.
The value of this option is ignored if Image-Dired is customized
-to use the Thumbnail Managing Standard. See
-`image-dired-thumbnail-storage'."
+to use the Thumbnail Managing Standard or the per-directory
+thumbnails setting. See `image-dired-thumbnail-storage'."
:type '(choice :tag "How to name thumbnail files"
(const :tag "SHA-1 of the image file name" sha1-filename)
(const :tag "SHA-1 of the image contents" sha1-contents))
@@ -208,8 +208,8 @@ image-dired-thumbnail-storage
Set this user option to `per-directory'.
-To control the naming of thumbnails for alternatives (2) and (3)
-above, customize the value of `image-dired-thumb-naming'.
+To control the naming of thumbnails for alternative (2) above,
+customize the value of `image-dired-thumb-naming'.
To control the default size of thumbnails for alternatives (2)
and (3) above, customize the value of `image-dired-thumb-size'.
--
2.40.0
[-- Attachment #3: Type: text/plain, Size: 237 bytes --]
>> BTW, I'm not running "make check" often but I have some failures here
>> and there (2 in TRAMP, 2 in EPG...): is it expected?
>
> Please report them as separate bugs.
Ok, I've created one for Tramp for the moment.
--
Manuel Giraud
next prev parent reply other threads:[~2023-07-29 16:50 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-09 19:06 bug#61394: 30.0.50; [PATCH] Image-dired thumb name based on content Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-10 15:13 ` Basil Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-10 18:46 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-11 9:50 ` Eli Zaretskii
2023-02-11 12:30 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-11 14:53 ` Eli Zaretskii
2023-02-11 22:33 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-11 23:06 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-12 3:02 ` Stefan Kangas
2023-02-12 21:53 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-15 14:19 ` Stefan Kangas
2023-02-15 15:35 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-19 14:06 ` Stefan Kangas
2023-02-19 14:43 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-19 16:19 ` Stefan Kangas
2023-02-20 9:20 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-25 18:45 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-26 19:18 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-27 7:04 ` Eli Zaretskii
2023-07-27 13:52 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-27 14:16 ` Eli Zaretskii
2023-07-27 21:30 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-28 6:55 ` Eli Zaretskii
2023-07-28 9:33 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-28 12:20 ` Eli Zaretskii
2023-07-28 16:00 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-28 18:44 ` Eli Zaretskii
2023-07-29 9:51 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-29 10:34 ` Eli Zaretskii
2023-07-29 16:50 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-08-03 8:43 ` Eli Zaretskii
2023-07-29 10:47 ` Michael Albinus
2023-07-31 15:53 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-01 17:05 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-02 11:42 ` Eli Zaretskii
2023-08-02 18:00 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-02 18:16 ` Eli Zaretskii
2023-08-03 11:10 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-03 11:38 ` Eli Zaretskii
2023-08-03 16:51 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-03 18:30 ` Eli Zaretskii
2023-08-04 7:44 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-04 10:55 ` Eli Zaretskii
2023-08-04 13:37 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-04 14:05 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87cz0airvw.fsf@ledu-giraud.fr \
--to=bug-gnu-emacs@gnu.org \
--cc=61394@debbugs.gnu.org \
--cc=contovob@tcd.ie \
--cc=eliz@gnu.org \
--cc=manuel@ledu-giraud.fr \
--cc=stefankangas@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.