| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
| List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
| 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 <fcn AT mail DOT noon DOT org> |
| Subject: | 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 | |
| MIME-Version: | 1.0 |
| 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" <Karel DOT Sprenger AT compaq DOT 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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |