unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
Subject: Re: A few issues with thumbs.el
Date: Thu, 9 Jun 2005 04:00:37 +0200	[thread overview]
Message-ID: <f7ccd24b050608190037f95ae2@mail.gmail.com> (raw)
In-Reply-To: <87vf508myc.fsf-monnier+emacs@gnu.org>

On 5/30/05, Stefan Monnier <monnier@iro.umontreal.ca> 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

  parent reply	other threads:[~2005-06-09  2:00 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-25 15:18 A few issues with thumbs.el Juanma Barranquero
2005-05-25 22:24 ` Stefan Monnier
2005-05-26  0:40   ` Juanma Barranquero
2005-05-26  3:01     ` Stefan Monnier
2005-05-26  8:17       ` Juanma Barranquero
2005-05-26 14:03         ` Stefan Monnier
2005-05-26  9:37     ` Juanma Barranquero
2005-05-26 14:02       ` Stefan Monnier
2005-05-26 14:19         ` Juanma Barranquero
2005-05-26 16:55           ` Stefan Monnier
2005-05-26 18:22             ` Juanma Barranquero
2005-05-26 19:24               ` Stefan Monnier
2005-05-26 22:49                 ` Juanma Barranquero
2005-05-26 23:05                   ` Stefan Monnier
2005-05-27  7:45                     ` Juanma Barranquero
2005-05-27 14:19                     ` Richard Stallman
2005-05-27 14:45           ` Juri Linkov
2005-05-28 11:53             ` Richard Stallman
2005-05-28 18:00               ` Juanma Barranquero
2005-05-28 21:03                 ` Robert J. Chassell
2005-05-29  2:48                   ` Juanma Barranquero
2005-05-29 20:27                     ` Robert J. Chassell
2005-05-29 21:48                       ` Juanma Barranquero
2005-05-30  0:42                         ` Robert J. Chassell
2005-05-29 12:04                 ` Richard Stallman
2005-05-29 15:08                   ` Juanma Barranquero
2005-05-30 10:03             ` Juanma Barranquero
2005-05-30 18:57               ` Juri Linkov
2005-05-30 20:29                 ` Juanma Barranquero
2005-05-30 20:38                   ` David Kastrup
2005-05-30 21:05               ` Stefan Monnier
2005-05-30 21:20                 ` Juanma Barranquero
2005-05-31 17:46                 ` Richard Stallman
2005-05-31 23:20                   ` Juanma Barranquero
2005-06-09  2:00                 ` Juanma Barranquero [this message]
2005-06-09 13:22                   ` Stefan Monnier
2005-06-09 13:35                     ` Juanma Barranquero
2005-06-09 14:22                       ` Stefan Monnier
2005-06-09 14:44                         ` Juanma Barranquero
2005-06-09 15:56                           ` Stefan Monnier
2005-06-12  9:13                       ` Mathias Dahl
2005-06-12 23:40                         ` Juanma Barranquero
2005-06-12 10:45                     ` Mathias Dahl
2005-06-12 23:46                       ` Juanma Barranquero
2005-06-13  7:12                         ` Mathias Dahl
2005-06-13  7:28                           ` Juanma Barranquero
2005-06-10  0:14                   ` Richard Stallman
2005-06-10  0:38                     ` Juanma Barranquero
2005-06-10 12:37                       ` Mathias Dahl
2005-06-10 14:27                         ` Juanma Barranquero
2005-06-10 15:06                           ` Juanma Barranquero
2005-06-12  9:01                 ` Mathias Dahl
2005-06-12 10:30                   ` Henrik Enberg
2005-06-12 14:02                     ` Mathias Dahl
2005-06-12 15:33                       ` Paul Pogonyshev
2005-06-13  6:02                       ` Juri Linkov
2005-06-13  7:11                         ` Mathias Dahl
2005-06-13  7:28                         ` Mathias Dahl
2005-06-13 21:48                           ` Daniel Brockman
2005-06-14 12:53                           ` Mathias Dahl
2005-06-13  8:44                       ` Kim F. Storm
2005-06-13 14:21                         ` Mathias Dahl
2005-06-13 22:03                           ` Daniel Brockman
2005-06-13 15:03                       ` Richard Stallman
2005-06-13 16:56                         ` Paul Pogonyshev
2005-06-13 23:38                           ` Richard Stallman
2005-06-12 18:03                   ` Stefan Monnier
2005-06-13  6:01                     ` Juri Linkov
2005-06-13 15:02                     ` Richard Stallman
2005-05-26  0:48 ` Juanma Barranquero

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=f7ccd24b050608190037f95ae2@mail.gmail.com \
    --to=lekktu@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 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).