This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re[2]: removing ^M from shell output not working


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]