From: Sebastian Tennant <sebyte@smolny.plus.com>
To: help-gnu-emacs@gnu.org
Subject: Re: ^M chars in *Async Command Output*
Date: Fri, 23 Jan 2009 10:25:57 +0000 [thread overview]
Message-ID: <skna71ze.fsf@vps203.linuxvps.org> (raw)
In-Reply-To: 1232703501.688012@arno.fh-trier.de
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
next prev parent reply other threads:[~2009-01-23 10:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.5557.1232699065.26697.help-gnu-emacs@gnu.org>
2009-01-23 9:37 ` ^M chars in *Async Command Output* Andreas Politz
2009-01-23 9:42 ` Andreas Politz
2009-01-23 10:25 ` Sebastian Tennant [this message]
[not found] ` <mailman.5625.1232778837.26697.help-gnu-emacs@gnu.org>
2009-01-24 8:25 ` Andreas Politz
2009-01-25 17:41 ` Sebastian Tennant
2009-01-23 8:25 Sebastian Tennant
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=skna71ze.fsf@vps203.linuxvps.org \
--to=sebyte@smolny.plus.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.