removing ^M from shell output not working
Fredrik Noon
fcn@mail.noon.org
Thu May 10 16:55:00 GMT 2001
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
More information about the Cygwin
mailing list