[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
w32 image-dired and Image Magick's `convert' and `display' with image-d
From: |
MON KEY |
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 |
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
- w32 image-dired and Image Magick's `convert' and `display' with image-dired-thumbnail-display-external, image-dired-dired-display-external,
MON KEY <=