unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Running a SFU POSIX shell on Emacs for Windows
@ 2003-10-15  9:44 Neves-Graca, Sancho
  0 siblings, 0 replies; 4+ messages in thread
From: Neves-Graca, Sancho @ 2003-10-15  9:44 UTC (permalink / raw)


I use Services for Unix (SFU) from Microsoft and would like to access its C shell from Emacs shell mode. This does not currently seem possible with the environment variable SHELL or the line (setq explicit-shell-file-name "C:\WINNT\System32\posix.exe /u /c /bin/csh -l") in the configuration file. The shell is started by calling posix.exe with

	C:\WINNT\System32\posix.exe /u /c /bin/csh -l

It seems that Emacs does not pass the arguments /u /c /bin/csh -l to the executable posix.exe and therefore the shell is not started. Moving to Cygwin is not an option for many users of SFU. Could this missing functionality be considered by the Emacs development team?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Running a SFU POSIX shell on Emacs for Windows
@ 2003-10-15 12:13 andrew.maguire
  0 siblings, 0 replies; 4+ messages in thread
From: andrew.maguire @ 2003-10-15 12:13 UTC (permalink / raw)
  Cc: help-gnu-emacs

Looking at shell.el it looks like you need to do the following:

(setq explicit-shell-file-name "C:\\WINNT\\System32\\posix.exe")
(setq explicit-posix.exe-args '("/u" "/c" "/bin/csh" "-l"))

Andrew

> -----Original Message-----
> From: Neves-Graca, Sancho [mailto:sancho.neves-graca@sap.com]
> Sent: 15 October 2003 10:45
> To: 'help-gnu-emacs@gnu.org'
> Subject: Running a SFU POSIX shell on Emacs for Windows
> 
> 
> I use Services for Unix (SFU) from Microsoft and would like 
> to access its C shell from Emacs shell mode. This does not 
> currently seem possible with the environment variable SHELL 
> or the line (setq explicit-shell-file-name 
> "C:\WINNT\System32\posix.exe /u /c /bin/csh -l") in the 
> configuration file. The shell is started by calling posix.exe with
> 
> 	C:\WINNT\System32\posix.exe /u /c /bin/csh -l
> 
> It seems that Emacs does not pass the arguments /u /c 
> /bin/csh -l to the executable posix.exe and therefore the 
> shell is not started. Moving to Cygwin is not an option for 
> many users of SFU. Could this missing functionality be 
> considered by the Emacs development team?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Running a SFU POSIX shell on Emacs for Windows
@ 2003-10-16 10:50 Neves-Graca, Sancho
  0 siblings, 0 replies; 4+ messages in thread
From: Neves-Graca, Sancho @ 2003-10-16 10:50 UTC (permalink / raw)
  Cc: help-gnu-emacs

Thank you Andrew for your feedback. Your proposal enabled running the shell mode for the SFU C shell. I would like to ask if you could consider the problem mentioned below. Getting SFU shells to work will I think merit some documentation (I intend to contribute it to either GNU or Interix).

After adding to ~/.emacs the commands

	(setq explicit-shell-file-name "C:\\WINNT\\System32\\posix.exe")
	(setq explicit-posix.exe-args '("/u" "/c" "/bin/csh" "-l"))

The following warning is given.

	csh: No entry for terminal type "emacs"
	csh: using dumb terminal setting

As per Emacs Windows FAQ I added the following to ~/.cshrc:

	if ("$term" == emacs) set term=interix

There remains the problem that the output of any Windows program called by the shell is not displayed. This indicates that the output stream is misdirected. How could this be corrected?

-----Original Message-----
From: andrew.maguire@ps.ge.com [mailto:andrew.maguire@ps.ge.com]
Sent: Wednesday, October 15, 2003 2:13 PM
To: Neves-Graca, Sancho
Cc: help-gnu-emacs@gnu.org
Subject: RE: Running a SFU POSIX shell on Emacs for Windows


Looking at shell.el it looks like you need to do the following:

(setq explicit-shell-file-name "C:\\WINNT\\System32\\posix.exe")
(setq explicit-posix.exe-args '("/u" "/c" "/bin/csh" "-l"))

Andrew

> -----Original Message-----
> From: Neves-Graca, Sancho [mailto:sancho.neves-graca@sap.com]
> Sent: 15 October 2003 10:45
> To: 'help-gnu-emacs@gnu.org'
> Subject: Running a SFU POSIX shell on Emacs for Windows
> 
> 
> I use Services for Unix (SFU) from Microsoft and would like 
> to access its C shell from Emacs shell mode. This does not 
> currently seem possible with the environment variable SHELL 
> or the line (setq explicit-shell-file-name 
> "C:\WINNT\System32\posix.exe /u /c /bin/csh -l") in the 
> configuration file. The shell is started by calling posix.exe with
> 
> 	C:\WINNT\System32\posix.exe /u /c /bin/csh -l
> 
> It seems that Emacs does not pass the arguments /u /c 
> /bin/csh -l to the executable posix.exe and therefore the 
> shell is not started. Moving to Cygwin is not an option for 
> many users of SFU. Could this missing functionality be 
> considered by the Emacs development team?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Running a SFU POSIX shell on Emacs for Windows
@ 2003-10-16 11:57 andrew.maguire
  0 siblings, 0 replies; 4+ messages in thread
From: andrew.maguire @ 2003-10-16 11:57 UTC (permalink / raw)
  Cc: help-gnu-emacs

> After adding to ~/.emacs the commands
> 
> 	(setq explicit-shell-file-name "C:\\WINNT\\System32\\posix.exe")
> 	(setq explicit-posix.exe-args '("/u" "/c" "/bin/csh" "-l"))
> 
> The following warning is given.
> 
> 	csh: No entry for terminal type "emacs"
> 	csh: using dumb terminal setting
> 
> As per Emacs Windows FAQ I added the following to ~/.cshrc:
> 
> 	if ("$term" == emacs) set term=interix
> 
> There remains the problem that the output of any Windows 
> program called by the shell is not displayed. This indicates 
> that the output stream is misdirected. How could this be corrected?

If /u means the same as it does for cmd.exe, then the unicode output
could be causing it...

The -l option to csh may be to run it as a login shell (ref to Linux
manpage)
you could try changing it to be -i, i.e. make csh run in interactive mode...
since this is what Emacs shell mode tries to do if you do not set the
explicit-*-args variable. In shell.el on HP-UX for csh it also passes -T
option which is some switch related to setting of TERM.

What happens if you leave TERM set to dumb rather than interix?

There is the possibility that posix.exe writes to the screen using the CON
device, if that is so then I think you are out of luck although that idea
may be out of date (anyone?).

I do not have SFU so I cannot check anything out I'm afraid.

Andrew

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-10-16 11:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-16 11:57 Running a SFU POSIX shell on Emacs for Windows andrew.maguire
  -- strict thread matches above, loose matches on Subject: below --
2003-10-16 10:50 Neves-Graca, Sancho
2003-10-15 12:13 andrew.maguire
2003-10-15  9:44 Neves-Graca, Sancho

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).