From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.devel Subject: Re: A few issues with thumbs.el Date: 12 Jun 2005 12:45:42 +0200 Message-ID: References: <87br6zuerw.fsf-monnier+emacs@gnu.org> <87u0kqrsur.fsf-monnier+emacs@gnu.org> <87hdgon2p2.fsf@jurta.org> <87vf508myc.fsf-monnier+emacs@gnu.org> <87wtp3d626.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1118573330 30799 80.91.229.2 (12 Jun 2005 10:48:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 12 Jun 2005 10:48:50 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 12 12:48:42 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DhQ0j-0002A0-SW for ged-emacs-devel@m.gmane.org; Sun, 12 Jun 2005 12:48:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DhQ5J-00036O-5c for ged-emacs-devel@m.gmane.org; Sun, 12 Jun 2005 06:52:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DhQ3W-0002Vg-My for emacs-devel@gnu.org; Sun, 12 Jun 2005 06:51:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DhQ3U-0002UV-GV for emacs-devel@gnu.org; Sun, 12 Jun 2005 06:51:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DhQ3S-0002QK-Dp for emacs-devel@gnu.org; Sun, 12 Jun 2005 06:51:02 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1DhPzK-0004G3-7Q for emacs-devel@gnu.org; Sun, 12 Jun 2005 06:46:46 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DhPtz-0001hu-BX for emacs-devel@gnu.org; Sun, 12 Jun 2005 12:41:15 +0200 Original-Received: from 1-1-3-38a.gml.gbg.bostream.se ([82.182.110.147]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 12 Jun 2005 12:41:15 +0200 Original-Received: from brakjoller by 1-1-3-38a.gml.gbg.bostream.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 12 Jun 2005 12:41:15 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 30 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 1-1-3-38a.gml.gbg.bostream.se User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:38628 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38628 Stefan Monnier writes: > > 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. > > Indeed, the delete-upon-load is also a heuristic and it's not > necessarily better than any other. I think anything is OK, as long > as it's run at least once per Emacs session where you use thumbs > without being run too often to slow everything down. I am merging this into tumme.el right now. How about something simple like using a defvar to store information about whether the clean-up function has been called in this session or not? After each call to `tumme-display-thumbs', check that variable, and if nil, ask the user if it is OK to do a clean up (or really check if a clean-up is necessary). We can provide options like "Yes, please clen-up", "No, ask me later", or "No, and don't bother me again this session" or something like that. Together with a custom variable that determines if we should use cleaning at all, this should suit most user's needs, right? What do you say? /Mathias