From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: MON KEY Newsgroups: gmane.emacs.devel Subject: w32 image-dired and Image Magick's `convert' and `display' with image-dired-thumbnail-display-external, image-dired-dired-display-external Date: Wed, 13 May 2009 16:04:11 -0400 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1242245072 25953 80.91.229.12 (13 May 2009 20:04:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 May 2009 20:04:32 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 13 22:04:23 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M4Kgg-0003C0-5Q for ged-emacs-devel@m.gmane.org; Wed, 13 May 2009 22:04:22 +0200 Original-Received: from localhost ([127.0.0.1]:53756 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M4Kgf-0007Uy-Mt for ged-emacs-devel@m.gmane.org; Wed, 13 May 2009 16:04:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M4Kga-0007Uf-BO for emacs-devel@gnu.org; Wed, 13 May 2009 16:04:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M4KgZ-0007UT-72 for emacs-devel@gnu.org; Wed, 13 May 2009 16:04:15 -0400 Original-Received: from [199.232.76.173] (port=59007 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M4KgY-0007UQ-Sq for emacs-devel@gnu.org; Wed, 13 May 2009 16:04:15 -0400 Original-Received: from yx-out-1718.google.com ([74.125.44.157]:6123) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M4KgY-0003f7-Fa for emacs-devel@gnu.org; Wed, 13 May 2009 16:04:14 -0400 Original-Received: by yx-out-1718.google.com with SMTP id 3so467753yxi.66 for ; Wed, 13 May 2009 13:04:11 -0700 (PDT) Original-Received: by 10.151.121.9 with SMTP id y9mr1835119ybm.125.1242245051310; Wed, 13 May 2009 13:04:11 -0700 (PDT) X-Google-Sender-Auth: 7af1243430794dfa X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:110855 Archived-At: There seem to be some little w32 related quirks in image-dired.el around `image-dired-thumbnail-display-external' and `image-dired-dired-display-external' When the Image Magick executable name is set as `display.exe' I'm getting: "Image Magick Exception display.exe: Unable to open X server `'display.c/DisplayImageCond/418 [No such file or dir]." After setting the image-dired-external-viewer executable name to `imdisplay.exe' (per the Image Magick installation instructions for w32) _this_ problem goes away. However, the var does not play nice with the system cmd shell and the w32 path with whitespace, e.g. `c:/Program Files/{...}/image-manipulation-program.exe' needs to be escaped as: `c:/\"Program Files\"/{...}/image-manipulation-program.exe' The conditional in image-dired-external-viewer should do a w32 system-type check _before_ searching for "display" and instead search for "imdisplay" e.g. ;;; ============================== *** dired.el~ --- dired.el *************** *** 1,11 **** (defcustom image-dired-external-viewer ;; TODO: Use mailcap, dired-guess-shell-alist-default, ;; dired-view-command-alist. ! (cond ((and (eq system-type 'windows-nt) ! (executable-find "imdisplay")) ! (when (string-match "[pP]rogram [fF]iles" image-dired-external-viewer)) ! (replace-regexp-in-string "[pP]rogram [fF]iles" "\"Program Files\"" image-dired-external-viewer)) ! ((executable-find "display")) ((executable-find "xli")) ((executable-find "qiv") "qiv -t")) "Name of external viewer. --- 1,7 ---- (defcustom image-dired-external-viewer ;; TODO: Use mailcap, dired-guess-shell-alist-default, ;; dired-view-command-alist. ! (cond ((executable-find "display")) ((executable-find "xli")) ((executable-find "qiv") "qiv -t")) "Name of external viewer. ;;; There may be additonal whitespace checks needed as well - this catches the most glaring one - on my system at least :). ;;; ============================== Following customizations might also need to be rexamined: - `image-dired-cmd-create-thumbnail-program' When using Image Magick w32 users are encouraged to name `convert.exe' --> `imconvert.exe' Emacs should recognize this convention when present. - `image-dired-cmd-create-standard-thumbnail-command' When using Image Magick w32 users are encouraged to name `convert.exe' --> `imconvert.exe' Again, when present Emacs should recognize convention when present and set the command to: `imconvert -size %wx%h "%f" -thumbnail "%wx%h>" png:"%t"' s_P