From: Andreas Politz <politza@fh-trier.de>
To: help-gnu-emacs@gnu.org
Subject: Re: ^M chars in *Async Command Output*
Date: Sat, 24 Jan 2009 09:25:51 +0100 [thread overview]
Message-ID: <1232785614.653196@arno.fh-trier.de> (raw)
In-Reply-To: <mailman.5625.1232778837.26697.help-gnu-emacs@gnu.org>
Sebastian Tennant wrote:
> Quoth Sebastian Tennant <sebyte@smolny.plus.com>:
>> 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.
>
> And it turns out neither of these are any help!
>
> The best (shortest) solution I can find is this:
>
> (add-hook 'shell-mode-hook
> (lambda ()
> (when (equal (buffer-name (current-buffer)) "*Async Shell Command*")
> (set-process-filter proc 'comint-output-filter))))
>
> It's ugly, (proc is a local variable!), but short of patching
> shell-command it does the trick for now.
>
> Sebastian
It's better than what I first came up with.
Anyway, the local variable is not nessecary.
(defun shell-command-filter-hook nil
"Filter all shell command output via `comint-output-filter'."
(let ((proc (get-buffer-process "*Async Shell Command*")))
(when proc
(set-process-filter proc 'comint-output-filter))))
-ap
next prev parent reply other threads:[~2009-01-24 8: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
[not found] ` <mailman.5625.1232778837.26697.help-gnu-emacs@gnu.org>
2009-01-24 8:25 ` Andreas Politz [this message]
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=1232785614.653196@arno.fh-trier.de \
--to=politza@fh-trier.de \
--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.