(file-remote-p): Docstring fix.
[bpt/emacs.git] / lisp / thumbs.el
index e9a6409..5260d5a 100644 (file)
@@ -1,6 +1,6 @@
 ;;; thumbs.el --- Thumbnails previewer for images files
 
-;; Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+;; Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Jean-Philippe Theberge <jphiltheberge@videotron.ca>
 ;; Maintainer: FSF
@@ -10,7 +10,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -29,7 +29,7 @@
 ;; It is used for basic browsing and viewing of images from within Emacs.
 ;; Minimal image manipulation functions are also available via external
 ;; programs.  If you want to do more complex tasks like categorise and tag
-;; your images, use tumme.el
+;; your images, use image-dired.el
 ;;
 ;; The 'convert' program from 'ImageMagick'
 ;; [URL:http://www.imagemagick.org/] is required.
@@ -67,7 +67,7 @@
   :version "22.1"
   :group 'multimedia)
 
-(defcustom thumbs-thumbsdir "~/.emacs.d/thumbs"
+(defcustom thumbs-thumbsdir (concat user-emacs-directory "thumbs")
   "*Directory to store thumbnails."
   :type 'directory
   :group 'thumbs)
@@ -93,6 +93,10 @@ When it reaches that size (in bytes), a warning is sent."
   :type 'integer
   :group 'thumbs)
 
+;; Unfortunately Windows XP has a program called CONVERT.EXE in
+;; C:/WINDOWS/SYSTEM32/ for partioning NTFS system.  So Emacs
+;; can find the one in your ImageMagick directory, you need to
+;; customize this value to the absolute filename.
 (defcustom thumbs-conversion-program
   (if (eq system-type 'windows-nt)
       "convert.exe"
@@ -248,15 +252,12 @@ ARG any arguments to the ACTION command,
 OUTPUT-FORMAT is the file format to output (default is jpeg),
 ACTION-PREFIX is the symbol to place before the ACTION command
               (defaults to '-' but can sometimes be '+')."
-  (let ((command (format "%s %s%s %s \"%s\" \"%s:%s\""
-                        thumbs-conversion-program
-                        (or action-prefix "-")
-                        action
-                        (or arg "")
-                        filein
-                        (or output-format "jpeg")
-                        fileout)))
-    (call-process shell-file-name nil nil nil shell-command-switch command)))
+  (call-process thumbs-conversion-program nil nil nil
+               (or action-prefix "-")
+               action
+               (or arg "")
+               filein
+               (format "%s:%s" (or output-format "jpeg") fileout)))
 
 (defun thumbs-new-image-size (s increment)
   "New image (a cons of width x height)."