emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: tumme messages in the echo area


From: Mathias Dahl
Subject: Re: tumme messages in the echo area
Date: Tue, 11 Jul 2006 15:26:23 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt)

Andrea Russo <address@hidden> writes:

> Nick Roberts <address@hidden> writes:
>
>> 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))

Great! Someone fixed my code before I even had the time to look at
this myself! :)

What do others think, is it safe to fix this in Emacs CVS now? Also,
is the two variants equal on all platforms? I am a bit skeptical about
the "-c" switch.

A better way, IMHO, would be if there was a way to supress the output
from `shell-command' when it the command does not generate any output.

/Mathias





reply via email to

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