0

From the package imagex, I use the function imagex-sticky-maximize to maximize the image files to the current window.

This works like a charm on Windows 7 x64 with Emacs 25.0.50 However, with the same Emacs setup, I'm trying out Linux Ubuntu. I use the latest Emacs snapshot:

GNU Emacs 25.0.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.16.7) of 2015-10-28

Everything in Emacs works, except the function imagex-sticky-maximize. Then I get the error when I want to maximize the image:

image+: (file-error Searching for program No such file or directory convert) 

I see the pictures (JPEG, PNG, everything) in Emacs buffer. So image display works.

When I look in the source code of imagex-sticky-maximize in order to understand why this problem arises on Linux, and not on Windows:

(defun imagex-sticky-maximize ()
"Maximize the point image to fit the current frame."
(interactive)
(imagex-sticky--convert-image
(lambda (image)
    (imagex--maximize image))))

Given the error message, seems the imagex-sticky--convert-image could be the culprit. Looking further in the source:

(defun imagex-sticky--convert-image (converter)
(catch 'done
    (let (err)
    (condition-case err1
        (let ((display (imagex-sticky--current-ovprop-display)))
            (when display
            (cl-destructuring-bind (image ov) display
                (let ((new (funcall converter image)))
                (plist-put (cdr new) 'imagex-manual-manipulation t)
                (overlay-put ov 'display new))
                (throw 'done t))))
        (error
        (setq err (append err err1))))
    (condition-case err2
        (let ((display (imagex-sticky--current-textprop-display)))
            (when display
            (cl-destructuring-bind (image begin end) display
                (let ((new (funcall converter image)))
                (plist-put (cdr new) 'imagex-manual-manipulation t)
                (imagex--replace-textprop-image begin end new))
                (throw 'done t))))
        (error
        (setq err (append err err2))))
    (when err
        (imagex--message "%s" err))
    (imagex-sticky-fallback this-command))))

I see no possible causes that could suggest why this fails on Linux and works on Windows. Any suggestion?

1 Answer 1

1

Isn't the error message clear enough? The package is missing a program called convert which part of imagemagick.

Just install imagemagick on your system.

3
  • How did you know that the program convert was part of imagemagick?
    – ReneFroger
    Oct 30, 2015 at 22:37
  • convert is a pretty common program, so Google will help you. Or you could use the package search of your distribution, e.g. packages.ubuntu.com
    – user227
    Oct 30, 2015 at 23:10
  • I have read convert, but I thought it was used as verb instead as naming for an application. Thanks for bringing me back on the right track.
    – ReneFroger
    Oct 31, 2015 at 17:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.