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 11:13:33 +0200 Message-ID: References: <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 1118569777 23459 80.91.229.2 (12 Jun 2005 09:49:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 12 Jun 2005 09:49:37 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 12 11:49:35 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DhP5o-0005lt-9y for ged-emacs-devel@m.gmane.org; Sun, 12 Jun 2005 11:49:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DhPAM-00033B-QE for ged-emacs-devel@m.gmane.org; Sun, 12 Jun 2005 05:54:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DhOn0-0007w7-T7 for emacs-devel@gnu.org; Sun, 12 Jun 2005 05:29:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DhOmc-0007fq-Fq for emacs-devel@gnu.org; Sun, 12 Jun 2005 05:29:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DhOhz-0006uS-Sc for emacs-devel@gnu.org; Sun, 12 Jun 2005 05:24:49 -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 1DhOYL-0007wG-E7 for emacs-devel@gnu.org; Sun, 12 Jun 2005 05:14:49 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DhOSr-0002Yd-7j for emacs-devel@gnu.org; Sun, 12 Jun 2005 11:09:09 +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 11:09:09 +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 11:09:09 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 59 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:38626 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38626 Juanma Barranquero writes: > Yeah. In fact I want to do that to detect whether the convert.exe in > the path is the ImageMagick's or Windows' one (alternatively, I'm > thinking of temporarily removing %windir%/* directories from > exec-path before trying to find convert.exe). I don't understand why we couldn't just leave this to the user to configure this, instead of trying to have more or less complex logic, trying to figure this out automatically. `find-dired' has the same problem in that it will find (haha) the wrong "find" on w32. It also has more or less hard-coded syntax in it. Juanma, you know how tumme.el currently does this; that works quite well, does it not? For others, this is how tumme currently handle this: (defcustom tumme-cmd-create-thumbnail-program "convert" "*Executable used to create thumbnail. Used together with `tumme-cmd-create-thumbnail-options'." :type 'string :group 'tumme) ... (defcustom tumme-cmd-create-thumbnail-options "%e -size %sx%s \"%f\" -resize %sx%s +profile \"*\" jpeg:\"%t\"" "*Format of command used to create thumbnail image. Available options are %e which is replaced by `tumme-cmd-create-thumbnail-program', %s which is replaced by `tumme-thumb-size', %f which is replaced by the file name of the original image and %t which is replaced by the file name of the thumbnail file." :type 'string :group 'tumme) ... (defun tumme-create-thumb (file) "Using the convert program, create thumbnail image for FILE and place it in `tumme-dir'" (let* ((size (int-to-string tumme-thumb-size)) (command (format-spec tumme-cmd-create-thumbnail-options (list (cons ?e tumme-cmd-create-thumbnail-program) (cons ?s size) (cons ?f file) (cons ?t (expand-file-name (tumme-thumb-name file))))))) (if (file-exists-p tumme-dir) (if (not (file-directory-p tumme-dir)) (error "%s exists but is not a directory!" tumme-dir)) (make-directory tumme-dir)) (shell-command command nil))) /Mathias