From: Sebastian Tennant <sebyte@smolny.plus.com>
To: help-gnu-emacs@gnu.org
Subject: Re: ^M chars in *Async Command Output*
Date: Sun, 25 Jan 2009 17:41:15 +0000 [thread overview]
Message-ID: <63k3i8qs.fsf@vps203.linuxvps.org> (raw)
In-Reply-To: 1232785614.653196@arno.fh-trier.de
Quoth Andreas Politz <politza@fh-trier.de>:
> [...] 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))))
The problem only afflicts asynchronous shell commands so better still
would be test this condition in the hook itself:
(defun async-shell-command-filter-hook nil
"Filter asynchronous shell command output via `comint-output-filter'."
(when (equal (buffer-name (current-buffer)) "*Async Shell Command*")
(let ((proc (get-buffer-process (current-buffer))))
(when proc (set-process-filter proc 'comint-output-filter)))))
People can then simply do:
(add-hook 'shell-mode-hook 'async-shell-command-filter-hook)
I filed a bug report against simple.el on this matter (a little
prematurely no doubt) but if we can get this hook added it will have
definitely been worthwhile.
Thanks for your help Andreas.
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-25 17:41 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
2009-01-25 17:41 ` Sebastian Tennant [this message]
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=63k3i8qs.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.