[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

when convert command not found



なかやまです
convert がない時に
  apply: Wrong type argument: stringp, nil
なエラーになり意味不明です。以下の修正はいかがでしょうか。

Index: w3m-image.el
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/w3m-image.el,v
retrieving revision 1.18
diff -u -r1.18 w3m-image.el
--- w3m-image.el	5 Jul 2005 23:52:27 -0000	1.18
+++ w3m-image.el	5 Jun 2007 22:49:14 -0000
@@ -113,11 +113,14 @@
 (defun w3m-imagick-start-convert-data (handler
 				       data from-type to-type &rest args)
   (w3m-process-do-with-temp-buffer
-      (success (progn
-		 (set-buffer-multibyte nil)
-		 (insert data)
-		 (apply 'w3m-imagick-start-convert-buffer
-			handler from-type to-type args)))
+      (success (if w3m-imagick-convert-program
+		   (progn
+		     (set-buffer-multibyte nil)
+		     (insert data)
+		     (apply 'w3m-imagick-start-convert-buffer
+			    handler from-type to-type args))
+		 (message "convert command not found")
+		 nil))
     (if (and success
 	     (not (zerop (buffer-size))))
 	(buffer-string))))