[Top][All Lists]

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

Re: tumme messages in the echo area

From: Stefan Monnier
Subject: Re: tumme messages in the echo area
Date: Wed, 12 Jul 2006 10:31:33 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> If you replace the calls to shell-command with calls to call-process does
>> that do what you want?
>> (shell-command COMMAND) ->
>> (call-process shell-file-name nil nil nil "-c" COMMAND)

> Yes it does!  Thank you very much for your help.

> This is the patch that implements your suggested change:

> --- orig/lisp/tumme.el
> +++ mod/lisp/tumme.el
> @@ -1776,7 +1776,7 @@
>                    (cons ?h height)
>                    (cons ?f file)
>                    (cons ?t new-file))))
> -          (setq ret (shell-command command nil))
> +          (setq ret (call-process shell-file-name nil nil nil "-c" command))
>            (if (not (= 0 ret))
>                (error "Could not resize image")))
>        (copy-file file new-file t))

BTW, I strongly suspect that the above can suffer from quoting problems if
`new-file' happens to contain spaces or quotes.

Maybe a better choice would be to turn tumme-cmd-create-temp-image-options
into a list of strings or something like that and instead of constructing
a command to pass to /bin/sh, we could directly build a list of arguments to
pass to `call-process'.


reply via email to

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