unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thievol@posteo.net>
To: 53229@debbugs.gnu.org
Subject: bug#53229: 29.0.50; Image-dired is not reusing thumbnails created in emacs-27
Date: Thu, 13 Jan 2022 19:53:23 +0000	[thread overview]
Message-ID: <87ee5bjth5.fsf@posteo.net> (raw)
In-Reply-To: <87zgnzsqc2.fsf@posteo.net>

[-- Attachment #1: Type: text/plain, Size: 587 bytes --]


After further searching, I discover image-dired is using sha1 to build
thumbnail filenames whereas in emacs-27 it uses md5, so the names are
differents and a new file is created.
I must use a different function to avoid duplicating all thumbnails,
using something like this:

    (cl-letf (((symbol-function 'sha1) #'md5))
      (image-dired-thumb-name file))

And while I was at it I used a cache to avoid calling md5 each time I
toggle or revisit an image directory with thumbnails, probably dired
should do the same as well, but it is a different issue.

-- 
Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 686 bytes --]

  reply	other threads:[~2022-01-13 19:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-13 13:41 bug#53229: 29.0.50; Image-dired is not reusing thumbnails created in emacs-27 Thierry Volpiatto
2022-01-13 19:53 ` Thierry Volpiatto [this message]
2022-01-14  7:56   ` Lars Ingebrigtsen
2022-01-14  8:39     ` Stefan Kangas
2022-01-14  8:56       ` Lars Ingebrigtsen
2022-01-14 15:28         ` Stefan Kangas
2022-01-14 16:30           ` Thierry Volpiatto
2022-01-14 13:37       ` Thierry Volpiatto

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ee5bjth5.fsf@posteo.net \
    --to=thievol@posteo.net \
    --cc=53229@debbugs.gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).