help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: ^M chars in *Async Command Output*


From: Andreas Politz
Subject: Re: ^M chars in *Async Command Output*
Date: Fri, 23 Jan 2009 10:42:52 +0100
User-agent: Mozilla-Thunderbird 2.0.0.17 (X11/20081018)

Andreas Politz wrote:
Sebastian Tennant wrote:
Hi all,

When I issue asynchronous commands using shell-command, for example:

  M-! apt-get update & RET

buffer *Async Command Output* is filled with ^M characters and the
output is generally a mess.

Apparently not all Emacsen behave in this way though.

If you have a moment, could you perform a similar test and let us know
if the same thing happens to you.  Include the Emacs version number in
your follow-up, and if it _does_ happen to you and you have a little
more time, whether you consider it a feature or a bug?

Your assistance is much appreciated.

Sebastian

I tried it with aptitude, it's the same. The process uses carriage-returns
to display the progress `widget' this show up as '^M' in emacs buffer.
Somehow this processes think they are running in a terminal, I think
because asynchronous shell-commands are runnning/started in a shell.

In a terminal :

$ echo -e 'Hello\rWorld'
$ World

In emacs :

M-! echo -e 'Hello\rWorld' &
Hello ^MWorld

Maybe a process-filter-function is the solution or pipe the command
through the utility 'col', like
M-! apt-get update | col &

Mh, the important thing is the pipe not the command, so `cat' would
bet the better choice.

-ap



reply via email to

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