emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master 63f4f02: If requested, use external image conve


From: Lars Ingebrigtsen
Subject: Re: [Emacs-diffs] master 63f4f02: If requested, use external image converters for exotic formats
Date: Mon, 30 Sep 2019 06:16:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> Why not split the string directly in image-converter--converters?
> Same for the ":probe" part?
>
> I.e. use something like:
>
>     (defvar image-converter--converters
>       '((graphicsmagick :command "gm" :convertargs ("convert") :probe 
> ("-list" "format"))
>         (imagemagick :command "convert" :probe ("-list" "format"))
>         (ffmpeg :command "ffmpeg" :probe "-decoders"))
>
> so it works even if the command's name (or some of the args your need to
> pass to the command) contains spaces?

Yup; I'll do that.

> This said, given that you use separate methods for the different backends:
>
>     (cl-defmethod image-converter--probe ((type (eql imagemagick)))
>
> I don't understand why you need those args in
> image-converter--converters instead of putting them directly into
> their respective methods.

Two reasons: I wanted to give the users some more customisability, and
reuse the same code in both the ImageMagick and GraphicsMagick
conversion functions.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

[Prev in Thread] Current Thread [Next in Thread]