From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: A few issues with thumbs.el Date: Thu, 26 May 2005 11:37:48 +0200 Message-ID: References: <87br6zuerw.fsf-monnier+emacs@gnu.org> Reply-To: Juanma Barranquero NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1117100624 31202 80.91.229.2 (26 May 2005 09:43:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 26 May 2005 09:43:44 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 26 11:43:43 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DbEsI-0002q1-44 for ged-emacs-devel@m.gmane.org; Thu, 26 May 2005 11:41:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DbEwK-00076f-DU for ged-emacs-devel@m.gmane.org; Thu, 26 May 2005 05:46:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DbEvg-0006ud-DX for emacs-devel@gnu.org; Thu, 26 May 2005 05:45:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DbEvc-0006su-75 for emacs-devel@gnu.org; Thu, 26 May 2005 05:45:24 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DbEvb-0006nd-O5 for emacs-devel@gnu.org; Thu, 26 May 2005 05:45:23 -0400 Original-Received: from [64.233.184.205] (helo=wproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DbEp3-0006TT-My for emacs-devel@gnu.org; Thu, 26 May 2005 05:38:37 -0400 Original-Received: by wproxy.gmail.com with SMTP id 50so525117wri for ; Thu, 26 May 2005 02:37:48 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=r2AtpyIX7F1+CFXLfh6LSMznXB04LaxtKCYys6YTL+vKB5HTN6RplGPskfThLHOvuN4ck7OqfaNp1NtRsOllyKY9nKK2NSacmW1TCU0A0RWXYsofZHOeHoPYZ1Vjke8M7jPMuSq15kq09F2AV7lObVn0UIpR4zE3G+wRCOht5hE= Original-Received: by 10.54.23.26 with SMTP id 26mr871074wrw; Thu, 26 May 2005 02:37:48 -0700 (PDT) Original-Received: by 10.54.82.6 with HTTP; Thu, 26 May 2005 02:37:48 -0700 (PDT) Original-To: emacs-devel@gnu.org In-Reply-To: Content-Disposition: inline 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:37687 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:37687 On second thought, this won't do: (defun thumbs-thumbname (img) "Return a thumbnail name for the image IMG." (convert-standard-filename (concat thumbs-thumbsdir "/" (expand-file-name img)))) because of directories, so it'll have to be: (defun thumbs-thumbname (img) "Return a thumbnail name for the image IMG." (convert-standard-filename (concat thumbs-thumbsdir "/" (subst-char-in-string ?\s ?\_ (apply 'concat (split-string (expand-file-name img) "/")))))) which still strikes me as more fragile than using md5. The probability of collision is higher, with the "_" vs " " and the fact that nothing precludes c:/1/23.tif and c:/12/3.tif both existing. I suppose I could transform the path separators to some other character, but that seems like piling hack over hack. --=20 /L/e/k/t/u