This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re[2]: removing ^M from shell output not working
- To: "Sprenger, Karel" <Karel dot Sprenger at compaq dot com>, "'Sagar R. Shah'" <Sagar dot Shah at sid dot cam dot ac dot uk>, Daniel Barclay <Daniel dot Barclay at digitalfocus dot com>, Sam Steingold <sds at gnu dot org>, cygwin <cygwin at cygwin dot com>, ntemacs-users at cs dot washington dot edu
- Subject: Re[2]: removing ^M from shell output not working
- From: Fredrik Noon <fcn at mail dot noon dot org>
- Date: Thu, 10 May 2001 16:54:21 -0700 (Pacific Daylight Time)
- References: <7866238A04D10045A304CF7E71F488D1106245@utoexc01.emea.cpqcorp.net>
On Tue, 8 May 2001 21:50:21 +0200 "Sprenger, Karel" <Karel.Sprenger@compaq.com> wrote:
> All I have is the following lines in my .emacs file:
>
> ;; Add proc-filter-shell-output-filter to get rid of ^M in shells
> (require 'proc-filters)
> (add-hook 'comint-output-filter-functions 'proc-filter-shell-output-filter)
>
> I used to have lots of other code that supposedly got rid of ^M's but
> didn't. Only recently I discovered that the above does the trick for me
> when I use Cygwin's bash as shell program.
I got this .emacs recipe from the Cygwin FAQ: works as advertised...
;; This assumes that Cygwin is installed in C:\cygwin (the
;; default) and that C:\cygwin\bin is not already in your
;; Windows Path (it generally should not be).
;;
(setq exec-path (cons "C:/cygwin/bin" exec-path))
(setenv "PATH" (concat "C:\\cygwin\\bin;" (getenv "PATH")))
;;
;; NT-emacs assumes a Windows command shell, which you change
;; here.
;;
(setq process-coding-system-alist '(("bash" . undecided-unix)))
(setq w32-quote-process-args ?\")
(setq shell-file-name "bash")
(setenv "SHELL" shell-file-name)
(setq explicit-shell-file-name shell-file-name)
;;
;; This removes unsightly ^M characters that would otherwise
;; appear in the output of java applications.
;;
(add-hook 'comint-output-filter-functions
'comint-strip-ctrl-m)
/Fredrik
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple