Stefan Monnier <[EMAIL PROTECTED]> writes: > - I wish there was a way to put the thumbs directly next to the original > image files. E.g. instead of ~/.emacs-thumbs/foo!bar!baz!toto!NNNN.jpg > I'd like to use ~/foo/bar/baz/.emacs-thumbs/toto_NNNN.jpg.
What are the benefits of doing this? I think it would litter the system with extra directories. I can see how it could solve the uniqueness-problem, not needing to add a hash anymore, but I don't know how big a problem that is (see discussion below). About thumbnail file naming: Currently, in tumme.el, I use a very simple way for creating the thumbnail file name: my_picture.jpg => ~/.tumme/my_picture.thumb.jpg my_other_picture.png => ~/.tumme/my_other_picture.thumb.jpg It works on my system because I have seen to it, by adding the images' EXIF DateTime-value to it, that all my images have unique file names, but I can see that is not likely on all user's setups. The potential for collisions will vary from one system to the other; some might have unique names like me, some might have a structure where they rely on the path to make the files unique. I think adding a hash at the end of the file name would be OK. Something like this, which is a slightly changed version of Juri's suggestion would be nice: (format "%s/%s-%x.jpg" thumbnail-directory (file-name-nondirectory filename) (sxhash filename)) The above would not work well for those that have many images with the same file name though, if they need to identify their images' thumbnail files. Btw, does anyone else agree with me that using something else than JPEG as thumbnail image format is a bad idea? I have tried using PNG but the files gets much larger. /Mathias _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel