[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ^M chars in *Async Command Output*
From: |
Sebastian Tennant |
Subject: |
Re: ^M chars in *Async Command Output* |
Date: |
Fri, 23 Jan 2009 10:25:57 +0000 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) |
Quoth Andreas Politz <politza@fh-trier.de>:
> 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 &
>
> -ap
Many thanks Andreas. I hadn't heard of col before. It's useful but no
good for processes that require user input (such as apt).
A function; (comint-carriage-motion), and a variable;
comint-inhibit-carriage-motion, exist precisely for this purpose.
How best to apply them to buffer *Async Command Output* is something I'm
still working on.
Sebastian
--
Emacs' AlsaPlayer - Music Without Jolts
Lightweight, full-featured and mindful of your idyllic happiness.
http://home.gna.org/eap