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 &