help-emacs-windows
[
Top
][
All Lists
]
Advanced
[
Date Prev
][Date Next][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Re: [h-e-w] Bash with emacs's shell
From
:
Theodore Jump
Subject
:
Re: [h-e-w] Bash with emacs's shell
Date
:
Fri, 30 Nov 2001 11:40:44 -0600
I don't use Cygwin bash as the default shell for personal reasons, but I like being able to invoke it. Here's the lisp I use to do so ...note
(defun w32-dev-go-bash ()
"Load Cygwin GNU-Win32 GNU Bourne Again Shell for interactive shell processing"
(interactive)
(require 'shell)
(let ((binary-process-input t) ; for 19.x
(binary-process-ouput nil) ; for 19.x
(coding-system-for-write 'no-conversion) ; for 20.x
(coding-system-for-read 'iso-latin-1-unix) ; for 20.x
(explicit-bash-args '("-login" "-i"))
(explicit-shell-file-name "")
(original-shell (getenv "SHELL"))
(ori-sfn shell-file-name)
(w32-quite-process-args ?\")
)
;; Wipe out PID in case emacs is called from Cygwin32 built BASH (this causes problems)
(setenv "PID" nil)
(if (and (getenv "CYGREL") (string-equal (getenv "CYGREL") "B20.1"))
(setenv "SHELL" (expand-file-name (concat (getenv "CYGROOT") "/bin/bash.exe")))
(setenv "SHELL" (expand-file-name (concat (getenv "CYGROOT") "/bin/bash.exe")))
)
(setq-default shell-file-name (getenv "SHELL")
explicit-shell-file-name shell-file-name)
(message (format "invoking bash ... %s" shell-file-name) )
(shell)
(setq-default shell-file-name ori-sfn)
(setenv "SHELL" original-shell)
)
)
Works for me with Emacs 21.1 and Cygwin-mostly-current but it does need some spiffying-up.
Cheers,
-Ted
reply via email to
[
Prev in Thread
]
Current Thread
[
Next in Thread
]
[h-e-w] Bash with emacs's shell
,
Peter Fraser
,
2001/11/29
RE: [h-e-w] Bash with emacs's shell
,
Sprenger, Karel
,
2001/11/29
[h-e-w] Bash with emacs's shell
,
Peter Fraser
,
2001/11/29
[h-e-w] Bash with emacs's shell
,
David Starks-Browning
,
2001/11/30
Re: [h-e-w] Bash with emacs's shell
,
Theodore Jump
<=
RE: [h-e-w] Bash with emacs's shell
,
Sprenger, Karel
,
2001/11/29
RE: [h-e-w] Bash with emacs's shell
,
Underwood, Jonathan
,
2001/11/30
Prev by Date:
RE: [h-e-w] ediff and customizations
Previous by thread:
[h-e-w] Bash with emacs's shell
Next by thread:
RE: [h-e-w] Bash with emacs's shell
Index(es):
Date
Thread