Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-Id: <200105102354.QAA17345@proxy4.ba.best.com> Date: Thu, 10 May 2001 16:54:21 -0700 (Pacific Daylight Time) From: Fredrik Noon Subject: Re[2]: removing ^M from shell output not working To: "Sprenger, Karel" , "'Sagar R. Shah'" , Daniel Barclay , Sam Steingold , cygwin , ntemacs-users AT cs DOT washington DOT edu MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Disposition: INLINE In-Reply-To: <7866238A04D10045A304CF7E71F488D1106245@utoexc01.emea.cpqcorp.net> References: <7866238A04D10045A304CF7E71F488D1106245 AT utoexc01 DOT emea DOT cpqcorp DOT net> X-Mailer: Mahogany, 0.62 'Mars', running under Windows NT 5.0 (build 2195, Service Pack 1) On Tue, 8 May 2001 21:50:21 +0200 "Sprenger, Karel" 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