* how to set CYGWIN variable for Emacs @ 2001-01-12 8:11 Daniel Barclay 2001-01-12 8:26 ` Larry Hall (RFK Partners, Inc) 0 siblings, 1 reply; 6+ messages in thread From: Daniel Barclay @ 2001-01-12 8:11 UTC (permalink / raw) To: cygwin What's the recommended way to set the CYGWIN environment variable when running in an NTEmacs shell buffer? The CygWin FAQ gives instructions at http://sources.redhat.com/cygwin/faq/faq.html#SEC54: ...you need to add the following code to your ~/.emacs or ~/_emacs file in order to use bash. ... ;; 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) However, this seems to run bash directly, bypassing the cygwin.bat file. Should Emacs run cygwin.bat directly? Should the CYGWIN variable be set in some place other than cygwin.bat (e.g., in Emacs or in the NT environment) so that it gets set even if cygwin.bat isn't run? Thanks, Daniel -- Daniel Barclay Digital Focus Daniel.Barclay@digitalfocus.com -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to set CYGWIN variable for Emacs 2001-01-12 8:11 how to set CYGWIN variable for Emacs Daniel Barclay @ 2001-01-12 8:26 ` Larry Hall (RFK Partners, Inc) 2001-01-12 11:43 ` Daniel Barclay 0 siblings, 1 reply; 6+ messages in thread From: Larry Hall (RFK Partners, Inc) @ 2001-01-12 8:26 UTC (permalink / raw) To: Daniel Barclay, cygwin At 11:12 AM 1/12/2001, Daniel Barclay wrote: >What's the recommended way to set the CYGWIN environment variable >when running in an NTEmacs shell buffer? > >The CygWin FAQ gives instructions at > http://sources.redhat.com/cygwin/faq/faq.html#SEC54: > > ...you need to add the following code to your ~/.emacs or ~/_emacs file > in order to use bash. ... > > ;; 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) > > >However, this seems to run bash directly, bypassing the cygwin.bat >file. > >Should Emacs run cygwin.bat directly? Should the CYGWIN variable be >set in some place other than cygwin.bat (e.g., in Emacs or in the >NT environment) so that it gets set even if cygwin.bat isn't run? Some of the settings in CYGWIN are read by cygwin1.dll only at DLL initialization time. As a result, it is generally recommended that you set CYGWIN *before* any Cygwin-dependent application runs (i.e. so that the DLL is not loaded and the changes take affect when the next app is run). This is really the only rule about how and where CYGWIN should be set. Feel free to set it in your control panel (on NT/W2K) or autoexec.bat (on Win 9x's) if you want. Larry Hall lhall@rfk.com RFK Partners, Inc. http://www.rfk.com 118 Washington Street (508) 893-9779 - RFK Office Holliston, MA 01746 (508) 893-9889 - FAX -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to set CYGWIN variable for Emacs 2001-01-12 8:26 ` Larry Hall (RFK Partners, Inc) @ 2001-01-12 11:43 ` Daniel Barclay 2001-01-12 12:01 ` Larry Hall (RFK Partners, Inc) 0 siblings, 1 reply; 6+ messages in thread From: Daniel Barclay @ 2001-01-12 11:43 UTC (permalink / raw) To: Larry Hall (RFK Partners, Inc); +Cc: cygwin "Larry Hall (RFK Partners, Inc)" wrote: > > At 11:12 AM 1/12/2001, Daniel Barclay wrote: > >What's the recommended way to set the CYGWIN environment variable > >when running in an NTEmacs shell buffer? > > > >The CygWin FAQ gives instructions at > > http://sources.redhat.com/cygwin/faq/faq.html#SEC54: > > ... > > (setq shell-file-name "bash") > > (setenv "SHELL" shell-file-name) > > (setq explicit-shell-file-name shell-file-name) > > ;; ... > >However, this seems to run bash directly, bypassing the cygwin.bat > >file. > > > >Should Emacs run cygwin.bat directly? Should the CYGWIN variable be > >set in some place other than cygwin.bat (e.g., in Emacs or in the > >NT environment) so that it gets set even if cygwin.bat isn't run? > > Some of the settings in CYGWIN are read by cygwin1.dll only at DLL > initialization time. As a result, it is generally recommended that you > set CYGWIN *before* any Cygwin-dependent application runs (i.e. so that > the DLL is not loaded and the changes take affect when the next app is > run). This is really the only rule about how and where CYGWIN should be > set. Feel free to set it in your control panel (on NT/W2K) or autoexec.bat > (on Win 9x's) if you want. Actually, part of what I was asking was this: Should Emacs should call cygwin.bat (instead of calling bash directly)? Daniel -- Daniel Barclay Digital Focus Daniel.Barclay@digitalfocus.com -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to set CYGWIN variable for Emacs 2001-01-12 11:43 ` Daniel Barclay @ 2001-01-12 12:01 ` Larry Hall (RFK Partners, Inc) 2001-01-12 13:14 ` David A. Cobb 0 siblings, 1 reply; 6+ messages in thread From: Larry Hall (RFK Partners, Inc) @ 2001-01-12 12:01 UTC (permalink / raw) To: Daniel Barclay; +Cc: cygwin At 02:44 PM 1/12/2001, Daniel Barclay wrote: >"Larry Hall (RFK Partners, Inc)" wrote: > > > > At 11:12 AM 1/12/2001, Daniel Barclay wrote: > > >What's the recommended way to set the CYGWIN environment variable > > >when running in an NTEmacs shell buffer? > > > > > >The CygWin FAQ gives instructions at > > > http://sources.redhat.com/cygwin/faq/faq.html#SEC54: > > > >... > > > (setq shell-file-name "bash") > > > (setenv "SHELL" shell-file-name) > > > (setq explicit-shell-file-name shell-file-name) > > > ;; >... > > >However, this seems to run bash directly, bypassing the cygwin.bat > > >file. > > > > > >Should Emacs run cygwin.bat directly? Should the CYGWIN variable be > > >set in some place other than cygwin.bat (e.g., in Emacs or in the > > >NT environment) so that it gets set even if cygwin.bat isn't run? > > > > Some of the settings in CYGWIN are read by cygwin1.dll only at DLL > > initialization time. As a result, it is generally recommended that you > > set CYGWIN *before* any Cygwin-dependent application runs (i.e. so that > > the DLL is not loaded and the changes take affect when the next app is > > run). This is really the only rule about how and where CYGWIN should be > > set. Feel free to set it in your control panel (on NT/W2K) or autoexec.bat > > (on Win 9x's) if you want. > >Actually, part of what I was asking was this: Should Emacs should >call cygwin.bat (instead of calling bash directly)? > >Daniel It doesn't have to if you make sure that everything that cygwin.bat did is done before you run Emacs and/or you know what you're doing. YMMV. Larry Hall lhall@rfk.com RFK Partners, Inc. http://www.rfk.com 118 Washington Street (508) 893-9779 - RFK Office Holliston, MA 01746 (508) 893-9889 - FAX -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to set CYGWIN variable for Emacs 2001-01-12 12:01 ` Larry Hall (RFK Partners, Inc) @ 2001-01-12 13:14 ` David A. Cobb 2001-01-12 13:49 ` Larry Hall (RFK Partners, Inc) 0 siblings, 1 reply; 6+ messages in thread From: David A. Cobb @ 2001-01-12 13:14 UTC (permalink / raw) To: Cygwin List In my uncommonly humble opinion, it's much neater to have (a copy of) CYGWIN.BAT launch bash first with a command "emacs &" If your ~/.emacs is silent on the subject, the appropriate shell will be set from environment variable SHELL. In practice, I go a step further and do "exec emacs -f shell" then do all my shell commands inside my favorite editor. The big issue, of course, is which file-naming system the emacs uses; but I just read that alle emacsen verstehen eunuchs. "Larry Hall (RFK Partners, Inc)" wrote: > At 02:44 PM 1/12/2001, Daniel Barclay wrote: > >"Larry Hall (RFK Partners, Inc)" wrote: > > > > > > At 11:12 AM 1/12/2001, Daniel Barclay wrote: > > > >What's the recommended way to set the CYGWIN environment variable > > > >when running in an NTEmacs shell buffer? > > > > > > > >The CygWin FAQ gives instructions at > > > > http://sources.redhat.com/cygwin/faq/faq.html#SEC54: > > > > > >... > > > > (setq shell-file-name "bash") > > > > (setenv "SHELL" shell-file-name) > > > > (setq explicit-shell-file-name shell-file-name) > > > > ;; > >... > > > >However, this seems to run bash directly, bypassing the cygwin.bat > > > >file. > > > > > > > >Should Emacs run cygwin.bat directly? Should the CYGWIN variable be > > > >set in some place other than cygwin.bat (e.g., in Emacs or in the > > > >NT environment) so that it gets set even if cygwin.bat isn't run? > > > > > > Some of the settings in CYGWIN are read by cygwin1.dll only at DLL > > > initialization time. As a result, it is generally recommended that you > > > set CYGWIN *before* any Cygwin-dependent application runs (i.e. so that > > > the DLL is not loaded and the changes take affect when the next app is > > > run). This is really the only rule about how and where CYGWIN should be > > > set. Feel free to set it in your control panel (on NT/W2K) or autoexec.bat > > > (on Win 9x's) if you want. > > > >Actually, part of what I was asking was this: Should Emacs should > >call cygwin.bat (instead of calling bash directly)? > > > >Daniel > > It doesn't have to if you make sure that everything that cygwin.bat did > is done before you run Emacs and/or you know what you're doing. YMMV. > > Larry Hall lhall@rfk.com > RFK Partners, Inc. http://www.rfk.com > 118 Washington Street (508) 893-9779 - RFK Office > Holliston, MA 01746 (508) 893-9889 - FAX > > -- > Want to unsubscribe from this list? > Check out: http://cygwin.com/ml/#unsubscribe-simple -- David A. Cobb, Software Engineer, Public Access Advocate. Public Key at: < http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=superbiskit > "Don't buy or use crappy software" "By the grace of God I am a Christian man, by my actions a great sinner" -- The Way of a Pilgrim [R. M. French, tr.] -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to set CYGWIN variable for Emacs 2001-01-12 13:14 ` David A. Cobb @ 2001-01-12 13:49 ` Larry Hall (RFK Partners, Inc) 0 siblings, 0 replies; 6+ messages in thread From: Larry Hall (RFK Partners, Inc) @ 2001-01-12 13:49 UTC (permalink / raw) To: David A. Cobb, Cygwin List I see nothing wrong with taking this approach. At 04:14 PM 1/12/2001, David A. Cobb wrote: >In my uncommonly humble opinion, it's much neater to have (a copy of) CYGWIN.BAT >launch bash first with a command "emacs &" If your ~/.emacs is silent on the >subject, the appropriate shell will be set from environment variable SHELL. In >practice, I go a step further and do "exec emacs -f shell" then do all my shell >commands inside my favorite editor. > >The big issue, of course, is which file-naming system the emacs uses; but I just >read that alle emacsen verstehen eunuchs. > >"Larry Hall (RFK Partners, Inc)" wrote: > > > At 02:44 PM 1/12/2001, Daniel Barclay wrote: > > >"Larry Hall (RFK Partners, Inc)" wrote: > > > > > > > > At 11:12 AM 1/12/2001, Daniel Barclay wrote: > > > > >What's the recommended way to set the CYGWIN environment variable > > > > >when running in an NTEmacs shell buffer? > > > > > > > > > >The CygWin FAQ gives instructions at > > > > > http://sources.redhat.com/cygwin/faq/faq.html#SEC54: > > > > > > > >... > > > > > (setq shell-file-name "bash") > > > > > (setenv "SHELL" shell-file-name) > > > > > (setq explicit-shell-file-name shell-file-name) > > > > > ;; > > >... > > > > >However, this seems to run bash directly, bypassing the cygwin.bat > > > > >file. > > > > > > > > > >Should Emacs run cygwin.bat directly? Should the CYGWIN variable be > > > > >set in some place other than cygwin.bat (e.g., in Emacs or in the > > > > >NT environment) so that it gets set even if cygwin.bat isn't run? > > > > > > > > Some of the settings in CYGWIN are read by cygwin1.dll only at DLL > > > > initialization time. As a result, it is generally recommended that you > > > > set CYGWIN *before* any Cygwin-dependent application runs (i.e. so that > > > > the DLL is not loaded and the changes take affect when the next app is > > > > run). This is really the only rule about how and where CYGWIN should be > > > > set. Feel free to set it in your control panel (on NT/W2K) or autoexec.bat > > > > (on Win 9x's) if you want. > > > > > >Actually, part of what I was asking was this: Should Emacs should > > >call cygwin.bat (instead of calling bash directly)? > > > > > >Daniel > > > > It doesn't have to if you make sure that everything that cygwin.bat did > > is done before you run Emacs and/or you know what you're doing. YMMV. > > > > Larry Hall lhall@rfk.com > > RFK Partners, Inc. http://www.rfk.com > > 118 Washington Street (508) 893-9779 - RFK Office > > Holliston, MA 01746 (508) 893-9889 - FAX > > > > -- > > Want to unsubscribe from this list? > > Check out: http://cygwin.com/ml/#unsubscribe-simple > >-- >David A. Cobb, Software Engineer, Public Access Advocate. Public Key at: >< http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=superbiskit > >"Don't buy or use crappy software" >"By the grace of God I am a Christian man, > by my actions a great sinner" -- The Way of a Pilgrim [R. M. French, tr.] > > > >-- >Want to unsubscribe from this list? >Check out: http://cygwin.com/ml/#unsubscribe-simple -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-01-12 13:49 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2001-01-12 8:11 how to set CYGWIN variable for Emacs Daniel Barclay 2001-01-12 8:26 ` Larry Hall (RFK Partners, Inc) 2001-01-12 11:43 ` Daniel Barclay 2001-01-12 12:01 ` Larry Hall (RFK Partners, Inc) 2001-01-12 13:14 ` David A. Cobb 2001-01-12 13:49 ` Larry Hall (RFK Partners, Inc)
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).