On 5/30/05, Stefan Monnier <[EMAIL PROTECTED]> wrote: > These are bugs and should be fixed. I'm thinking of: > > ;; Make sure auto-image-file-mode is ON. > (auto-image-file-mode t)
Removed. > > ;; Create the thumbs directory if it does not exists. > (setq thumbs-thumbsdir (expand-file-name thumbs-thumbsdir)) > > (when (not (file-directory-p thumbs-thumbsdir)) > (progn > (make-directory thumbs-thumbsdir) > (message "Creating thumbnails directory"))) I've added a new function to return the thumbnails dir, creating it if needed. Additionally, I've had to change a few more things, like thumbs-temp-file, which got created and didn't update when thumbs-thumbdir changed; now it is a function. I've also turned thumbs-gensym into a CL gensym clone; there was no point in having a different default prefix or anything (no one in his/her sane mind is gonna load thumbs.el just in order to have gensym). > (when thumbs-thumbsdir-auto-clean > (thumbs-cleanup-thumbsdir)) This is the only extant top-level action. The question is, what to do with the thumbsdir cleanup? It could be an interactive command issued by the user (not pretty, but not entirely unreasonable), or it could be automatically triggered by the functions that create new thumbnails. If so, in order to be efficient, it should be called *after* creating the thumbnails, passing it a list of recently-created thumbnails that it should preserve; otherwise, when the directory has reached the limit, every single thumbnail creation would trigger deletion of old thumbnails, which, in directories with many images, would mean that a lot of thumbnails are deleted just to be recreated immediately. Alternatively, the cleanup could be triggered periodically, via timers or by any other means. The problem with both alternatives is that there will be circumstances when the thumbnails directory will be bigger (perhaps much bigger) than `thumbs-thumbsdir-max-size'; but this is no different of what happens right now. Another question. Are things like: (defcustom thumbs-conversion-program ... (or (executable-find "convert") ... kosher? I ask because this is, after all, a top-level action executed on loading. > - 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. Hmm. Is NNNN.jpg an image on toto/, or toto_NNNN.jpg an image on baz/? -- /L/e/k/t/u _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel