Merge pull request #3347 from drzv/im7-compat2
showterm.el: use new magick command by default, fallback to convert
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
;;
|
;;
|
||||||
;; - Scryer Prolog
|
;; - Scryer Prolog
|
||||||
;; - `dot' (from Graphviz)
|
;; - `dot' (from Graphviz)
|
||||||
;; - `convert' (from ImageMagick)
|
;; - `convert' or `magick' (from ImageMagick)
|
||||||
;;
|
;;
|
||||||
;; Copy showterm.el and showterm.pl to the same directory,
|
;; Copy showterm.el and showterm.pl to the same directory,
|
||||||
;; say ~/scryer-prolog/tools/, and add to your .emacs:
|
;; say ~/scryer-prolog/tools/, and add to your .emacs:
|
||||||
@@ -76,18 +76,17 @@
|
|||||||
(setq str (buffer-string))
|
(setq str (buffer-string))
|
||||||
(erase-buffer))
|
(erase-buffer))
|
||||||
(let ((proc (let (process-connection-type)
|
(let ((proc (let (process-connection-type)
|
||||||
(make-process :name "convert"
|
(start-process "imagemagick" (current-buffer)
|
||||||
:buffer (current-buffer)
|
(or (executable-find "magick")
|
||||||
:stderr " convert-stderr"
|
"convert")
|
||||||
:command `("convert"
|
|
||||||
"png:-"
|
"png:-"
|
||||||
"-gravity" "center"
|
"-gravity" "center"
|
||||||
"-background" "white"
|
"-background" "white"
|
||||||
"-scale" ,(format "%dx%d"
|
"-scale" (format "%dx%d"
|
||||||
showterm-pixel-width
|
showterm-pixel-width
|
||||||
showterm-pixel-width)
|
showterm-pixel-width)
|
||||||
"-extent" ,(format "%dx" showterm-pixel-width)
|
"-extent" (format "%dx" showterm-pixel-width)
|
||||||
"png:-")))))
|
"png:-"))))
|
||||||
(process-send-string proc str)
|
(process-send-string proc str)
|
||||||
(process-send-eof proc)
|
(process-send-eof proc)
|
||||||
(showterm-wait-for-process proc))
|
(showterm-wait-for-process proc))
|
||||||
|
|||||||
Reference in New Issue
Block a user