Juanma Barranquero <[EMAIL PROTECTED]> 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 _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel