GNU bug report logs - #53229
29.0.50; Image-dired is not reusing thumbnails created in emacs-27

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thievol <at> posteo.net>

Date: Thu, 13 Jan 2022 13:45:02 UTC

Severity: minor

Found in version 29.0.50

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 53229 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: 53229 <at> debbugs.gnu.org
Subject: 29.0.50; Image-dired is not reusing thumbnails created in emacs-27
Date: Thu, 13 Jan 2022 19:53:23 +0000
[Message part 1 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 189 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.