Using MSYS as Emacs shell

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Using MSYS as Emacs shell

David A. Cobb-2
  On one Windows machine, I have both Cygwin and MingW32+MSYS
installed.  To go with it, I have both Cygwin and Windows native emacsen.
On the native system, I find using MS cmd.exe as the shell is sub-optimal.
Would it be possible to set up MSYS as the shell?

This is part of a more-general question.  How can an application tell
whether it was launched by MSYS?  There are some tools I want to make
behave appropriately to the environment I'm working in.
--

David A. Cobb -- computing t-rex


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mingw-msys mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mingw-msys
Reply | Threaded
Open this post in threaded view
|

Re: Using MSYS as Emacs shell

Vincent Torri-2


On Fri, 9 Apr 2010, David A. Cobb wrote:

>  On one Windows machine, I have both Cygwin and MingW32+MSYS
> installed.  To go with it, I have both Cygwin and Windows native emacsen.
> On the native system, I find using MS cmd.exe as the shell is sub-optimal.
> Would it be possible to set up MSYS as the shell?

in MSYS, the shell is actually bash. Iirc, there is no possible way to do
what you want. Use either the DOS console or the MSYS console (without
rxvt)

> This is part of a more-general question.  How can an application tell
> whether it was launched by MSYS?  There are some tools I want to make
> behave appropriately to the environment I'm working in.

get the value of the environment variable "TERM".

regards

Vincent Torri

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mingw-msys mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mingw-msys
Reply | Threaded
Open this post in threaded view
|

Re: Using MSYS as Emacs shell

Keith Marshall-3
On Saturday 10 April 2010 11:26:51 Vincent Torri wrote:
> On Fri, 9 Apr 2010, David A. Cobb wrote:
> >  On one Windows machine, I have both Cygwin and MingW32+MSYS
> > installed.  To go with it, I have both Cygwin and Windows native
> > emacsen. On the native system, I find using MS cmd.exe as the
> > shell is sub-optimal. Would it be possible to set up MSYS as the
> > shell?
>
> in MSYS, the shell is actually bash.

Yes, it is, but in a standard MSYS installation we normally start it
in `sh compatibility' mode.

> Iirc, there is no possible way to do what you want.

Maybe; maybe not.  Depending on how your native MSW emacs invokes a
shell, it may be just a matter of making the COMSPEC variable, (in
the environment), point to the MSYS shell; try starting emacs from
the MSYS shell itself, with a command such as:--

  $ COMSPEC=/bin/sh.exe path/to/emacs ...

(This should work, if emacs uses a `system()' call, resolved through
MSVCRT.DLL, as would be the case if built using MinGW, or any other
compiler suite which uses this, or a derivative runtime).

> Use either the DOS console or the MSYS console (without rxvt)

Huh?  Certainly, avoid RXVT like the plague; use a native Win32
console, either standalone, or driven through Console2.

> > This is part of a more-general question.  How can an application
> > tell whether it was launched by MSYS?  There are some tools I
> > want to make behave appropriately to the environment I'm working
> > in.
>
> get the value of the environment variable "TERM".

$TERM isn't really a good choice for identifying an MSYS environment,
(it is too ubiquitous); something MSYS specific, such as $MSYSTEM,
would surely be a better choice.

--
Regards,
Keith.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mingw-msys mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mingw-msys
Reply | Threaded
Open this post in threaded view
|

Re: Using MSYS as Emacs shell

Vincent Torri-2

>> get the value of the environment variable "TERM".
>
> $TERM isn't really a good choice for identifying an MSYS environment,
> (it is too ubiquitous); something MSYS specific, such as $MSYSTEM,
> would surely be a better choice.

why is MSYSTEM better ?

Vincent Torri

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mingw-msys mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mingw-msys
Reply | Threaded
Open this post in threaded view
|

Re: Using MSYS as Emacs shell

Keith Marshall-3
On Saturday 10 April 2010 14:50:26 Vincent Torri wrote:
> > $TERM isn't really a good choice for identifying an MSYS
> > environment, (it is too ubiquitous); something MSYS specific,
> > such as $MSYSTEM, would surely be a better choice.
>
> why is MSYSTEM better ?

$TERM identifies capabilities of the underlying *terminal*, as
configured within a termios or termcap database; it is not specific
to the operating system.  (FWIW, several years ago I was supporting
a process control system hosted on SunOS, via telnet access from my
local MSYS host.  To get proper operation in the MSYS client, I had
to define the `msys' terminal type in the SunOS termios database.  
If I were to interrogate $TERM in such a telnet session, I would
have seen `msys', but the host OS was SunOS; your assertion that
$TERM == msys identifies MSYS as the host OS would have failed
comprehensively in this scenario).

OTOH, $MSYSTEM identifies a property of the OS itself, so is a better
choice.  However, even this is not an ideal choice, because:--

  1) It isn't guaranteed to exist; (it is an MSYS peculiarity).
  2) It can be modified by the user, so may yield false results.

What is really needed is a mechanism to interrogate the output from
`uname', (perhaps specifically `uname -o' or `uname -s'); use of an
environment variable related to this is simply more convenient than
spawning the `uname' command to inspect its output.  (Note that
changing the value of $MSYSTEM affects the output of `uname -s').

In this particular case, $OSTYPE would seem to be a better choice
from among the bash shell's predefined environment variables, but it
comes with a gotcha: it isn't normally exported.  Thus, if you want
to use it in the manner required for this purpose, *you* need to
ensure that it is exported from your top level shell.

--
Regards,
Keith.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mingw-msys mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mingw-msys
Reply | Threaded
Open this post in threaded view
|

Re: Using MSYS as Emacs shell

Oleksandr Gavenko (aka gavenkoa)
In reply to this post by David A. Cobb-2
On 2010-04-10 2:37, David A. Cobb wrote:
>    On one Windows machine, I have both Cygwin and MingW32+MSYS
> installed.  To go with it, I have both Cygwin and Windows native emacsen.
> On the native system, I find using MS cmd.exe as the shell is sub-optimal.
> Would it be possible to set up MSYS as the shell?
>
Yes.

I find myself using bash as default shell make my job more convenient.

I set env var

   SHELL=/bin/bash

as global, so not only Emacs understand but also RXVT use this value.

To make MSYS/Cygwin path work also use cygwin-mount.el
(get it from emacs-wiki):

   (load "E:/home/usr/share/emacs/site-lisp/cygwin-mount.el")
   (cygwin-mount-activate)

Nice, now M-! and M-x shell use bash!

Some internal Emacs lisp don't know about such Emacs shell use
on Windows, so you can have trouble on some commands.

Now day I switch completely from using MSYS
as dumb instrument for daily use. For example
sed from MSYS too old and dont know -i option
which allow replace in file without temporary file.

MSYS need only as lightweight addition to MinGW
for compiling packages.

In other corner in Cygwin
you feel much like in Linux + to you available
ready to use useful command line packages
(indent,tidy,ssh client/server,latex,...), ruby/python/perl,
VCS (cvs,svn,hg,bzr,git),...

Note. I early use bash for M-x shell and cmproxy.exe for M-! by:

   (setq explicit-shell-file-name "bash")
   (setq shell-file-name (concat exec-directory "cmdproxy.exe"))

--
Best regards!


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mingw-msys mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mingw-msys
Reply | Threaded
Open this post in threaded view
|

Re: Using MSYS as Emacs shell

Greg Chicares-2
On 2010-04-13 20:16Z, Oleksandr Gavenko wrote:
>
> sed from MSYS too old and dont know -i option
> which allow replace in file without temporary file.

sed-4.2.1 for MSYS announced here:

http://article.gmane.org/gmane.comp.gnu.mingw.user/30509/match=sed+4.2.1

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mingw-msys mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mingw-msys
Reply | Threaded
Open this post in threaded view
|

Re: Using MSYS as Emacs shell

Oleksandr Gavenko (aka gavenkoa)
On 2010-04-13 23:35, Greg Chicares wrote:
> On 2010-04-13 20:16Z, Oleksandr Gavenko wrote:
>>
>> sed from MSYS too old and dont know -i option
>> which allow replace in file without temporary file.
>
> sed-4.2.1 for MSYS announced here:
>
> http://article.gmane.org/gmane.comp.gnu.mingw.user/30509/match=sed+4.2.1
>
Nice! Also good have groff and man!


Is there exist installer for MSYS related packages?
Like MinGW-5.1.6.exe  or old MSYS-1.0.11.exe?

 > Charles Wilson <cwilso11@...>
 > Subject: Updated packages available (wave 4)
 > 3) And, some of these (rxvt) need to be removed from msysCORE anyway.

This mean that RXVT can be removed completely from MSYS/MinGW
or replaced with something like mintty?

--
Best regards!


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mingw-msys mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mingw-msys
Reply | Threaded
Open this post in threaded view
|

Re: Using MSYS as Emacs shell [Partially solved]

David A. Cobb-2
In reply to this post by Keith Marshall-3
  On 04/10/2010 09:38 AM, Keith Marshall wrote:

> On Saturday 10 April 2010 11:26:51 Vincent Torri wrote:
>> On Fri, 9 Apr 2010, David A. Cobb wrote:
>>>   On one Windows machine, I have both Cygwin and MingW32+MSYS
>>> installed.  To go with it, I have both Cygwin and Windows native
>>> emacsen. On the native system, I find using MS cmd.exe as the
>>> shell is sub-optimal. Would it be possible to set up MSYS as the
>>> shell?
>> in MSYS, the shell is actually bash.
> Yes, it is, but in a standard MSYS installation we normally start it
> in `sh compatibility' mode.
>
>> Iirc, there is no possible way to do what you want.
> Maybe; maybe not.  Depending on how your native MSW emacs invokes a
> shell, it may be just a matter of making the COMSPEC variable, (in
> the environment), point to the MSYS shell; try starting emacs from
> the MSYS shell itself, with a command such as:--
>
>    $ COMSPEC=/bin/sh.exe path/to/emacs ...
>
> (This should work, if emacs uses a `system()' call, resolved through
> MSVCRT.DLL, as would be the case if built using MinGW, or any other
> compiler suite which uses this, or a derivative runtime).
>
What I've done so far, after examining the code in emacs "shell.el"
library, is this:
 From the MSYS console, " $ emacs ..." invokes a  small sh script.  The
script sets, especially,
ESHELL="C:/Windows/Path/To/MSYS/bash.exe".
>> Use either the DOS console or the MSYS console (without rxvt)
> Huh?  Certainly, avoid RXVT like the plague; use a native Win32
> console, either standalone, or driven through Console2.
Please, please, why??  I quite like RXVT and I don't see any problems
with it.  But what is "Console2".
>>> This is part of a more-general question.  How can an application
>>> tell whether it was launched by MSYS?  There are some tools I
>>> want to make behave appropriately to the environment I'm working
>>> in.
>> get the value of the environment variable "TERM".
> $TERM isn't really a good choice for identifying an MSYS environment,
> (it is too ubiquitous); something MSYS specific, such as $MSYSTEM,
> would surely be a better choice.
>
I agree, TERM was not a great choice for the MSYS folks.  MSYSTEM would
be  good but require more emacs hacking than I'm ready to do yet.  As I
said above, ESHELL is the magic word for the emacs shell library.

IMNSHO, however, the _right_ choice would be to set "MACHTYPE" to
whatever a configure scriipt expects when parsing an MSYS build.  It's
no "trick" at all -- MACHTYPE already has the desired semantics.



--
David A. Cobb -- computing t-rex


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mingw-msys mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mingw-msys
Reply | Threaded
Open this post in threaded view
|

Re: Using MSYS as Emacs shell [Partially solved]

Greg Chicares-2
On 2010-04-19 14:43Z, David A. Cobb wrote:
>>> Use either the DOS console or the MSYS console (without rxvt)
>> Huh?  Certainly, avoid RXVT like the plague; use a native Win32
>> console, either standalone, or driven through Console2.
> Please, please, why??  I quite like RXVT and I don't see any problems
> with it.

Others have had problems with it:

http://search.gmane.org/?query=rxvt&group=gmane.comp.gnu.mingw*

but YMMV.

>  But what is "Console2".

http://www.google.com/#q=console2

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mingw-msys mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mingw-msys
Reply | Threaded
Open this post in threaded view
|

Re: Using MSYS as Emacs shell [Partially solved]

David A. Cobb-2
In reply to this post by Keith Marshall-3
  On 04/10/2010 09:38 AM, Keith Marshall wrote:

> On Saturday 10 April 2010 11:26:51 Vincent Torri wrote:
>> On Fri, 9 Apr 2010, David A. Cobb wrote:
>>>   On one Windows machine, I have both Cygwin and MingW32+MSYS
>>> installed.  To go with it, I have both Cygwin and Windows native
>>> emacsen. On the native system, I find using MS cmd.exe as the
>>> shell is sub-optimal. Would it be possible to set up MSYS as the
>>> shell?
>> in MSYS, the shell is actually bash.
> Yes, it is, but in a standard MSYS installation we normally start it
> in `sh compatibility' mode.
>
>> Iirc, there is no possible way to do what you want.
> Maybe; maybe not.  Depending on how your native MSW emacs invokes a
> shell, it may be just a matter of making the COMSPEC variable, (in
> the environment), point to the MSYS shell; try starting emacs from
> the MSYS shell itself, with a command such as:--
>
>    $ COMSPEC=/bin/sh.exe path/to/emacs ...
>
> (This should work, if emacs uses a `system()' call, resolved through
> MSVCRT.DLL, as would be the case if built using MinGW, or any other
> compiler suite which uses this, or a derivative runtime).
>

What I've done so far, after examining the code in emacs "shell.el"
library, is this:
 From the MSYS console, " $ emacs ..." invokes a  small sh script.  The
script sets, especially,
ESHELL="C:/Windows/Path/To/MSYS/bash.exe".


>> Use either the DOS console or the MSYS console (without rxvt)
> Huh?  Certainly, avoid RXVT like the plague; use a native Win32
> console, either standalone, or driven through Console2.

Please, please, why??  I quite like RXVT and I don't see any problems
with it.  But what is "Console2".


>>> This is part of a more-general question.  How can an application
>>> tell whether it was launched by MSYS?  There are some tools I
>>> want to make behave appropriately to the environment I'm working
>>> in.
>> get the value of the environment variable "TERM".
> $TERM isn't really a good choice for identifying an MSYS environment,
> (it is too ubiquitous); something MSYS specific, such as $MSYSTEM,
> would surely be a better choice.
>

I agree, TERM was not a great choice for the MSYS folks.  MSYSTEM would
be  good but require more emacs hacking than I'm ready to do yet.  As I
said above, ESHELL is the magic word for the emacs shell library.


IMNSHO, however, the _right_ choice would be to set "MACHTYPE" to
whatever a configure scriipt expects when parsing an MSYS build.  It's
no "trick" at all -- MACHTYPE already has the desired semantics.

--
David A. Cobb -- computing t-rex


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mingw-msys mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mingw-msys
Reply | Threaded
Open this post in threaded view
|

Re: Using MSYS as Emacs shell [Partially solved]

Keith Marshall-3
In reply to this post by David A. Cobb-2
On Monday 19 April 2010 15:43:49 David A. Cobb wrote:

[No need to cc me separately, thanks David; I follow the list]

> > Huh?  Certainly, avoid RXVT like the plague; use a native Win32
> > console, either standalone, or driven through Console2.
>
> Please, please, why??  I quite like RXVT and I don't see any
> problems with it.

Many others do.  RXVT expects stdio streams to be attached to ptys,
but MSW has no such thing.  MSYS emulates them with pipes, which
behave as regular file streams.  Thus, isatty(3) returns false,
(where for a pty or a real tty it *should* return true), and I/O
buffering will be set up incorrectly for the stdio streams.  This
usually causes interactive programs to misbehave -- badly.

> But what is "Console2".

Greg has already answered that; JFGI, and it's the first hit.

> > $TERM isn't really a good choice for identifying an MSYS
> > environment, (it is too ubiquitous); something MSYS specific,
> > such as $MSYSTEM, would surely be a better choice.
>
> I agree, TERM was not a great choice for the MSYS folks.

$TERM is perfectly good, and the correct choice, for the purpose it
is intended, (and as designated by the original MSYS developers); it
just isn't a great choice for *your* (very different) purpose.

> IMNSHO, however, the _right_ choice would be to set "MACHTYPE" to
> whatever a configure scriipt expects when parsing an MSYS build.
>  It's no "trick" at all -- MACHTYPE already has the desired
> semantics.

A "not so humble opinion" maybe, but perhaps not so astute!  As I've
already pointed out in a previous follow-up, $OSTYPE would likely be
a better choice, (it would tell you "msys" directly, unlike $MACHTYPE
which you would have to parse further), but it and $MACHTYPE alike,
exhibit their own particular disadvantages:--

* Both are bash-isms, therefore not guaranteed to be defined in any
  context, other than within a bash shell.

* Neither is exported, (unless you make it so), and therefore may
  not be visible in your emacs process context, even if launched by
  a bash shell; (they will be automatically recreated within any
  bash shell you subsequently spawn, but they don't propagate).

--
Regards,
Keith.

------------------------------------------------------------------------------
_______________________________________________
Mingw-msys mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mingw-msys
Reply | Threaded
Open this post in threaded view
|

Re: Using MSYS as Emacs shell [Partially solved]

David A. Cobb-2
  On 04/20/2010 05:13 PM, Keith Marshall wrote:
> On Monday 19 April 2010 15:43:49 David A. Cobb wrote:
>
> [No need to cc me separately, thanks David; I follow the list]
OK, I routinely "Reply All" on list traffic.  Don't mean to reduce the
signal-to-noise ratio.

>>> Huh?  Certainly, avoid RXVT like the plague; use a native Win32
>>> console, either standalone, or driven through Console2.
>> Please, please, why??  I quite like RXVT and I don't see any
>> problems with it.
> Many others do.  RXVT expects stdio streams to be attached to ptys,
> but MSW has no such thing.  MSYS emulates them with pipes, which
> behave as regular file streams.  Thus, isatty(3) returns false,
> (where for a pty or a real tty it *should* return true), and I/O
> buffering will be set up incorrectly for the stdio streams.  This
> usually causes interactive programs to misbehave -- badly.
>
>> But what is "Console2".
> Greg has already answered that; JFGI, and it's the first hit.
Found it, thanks.  I'll give it a try RSN.
>>> $TERM isn't really a good choice for identifying an MSYS
>>> environment, (it is too ubiquitous); something MSYS specific,
>>> such as $MSYSTEM, would surely be a better choice.
>> I agree, TERM was not a great choice for the MSYS folks.
> $TERM is perfectly good, and the correct choice, for the purpose it
> is intended, (and as designated by the original MSYS developers); it
> just isn't a great choice for *your* (very different) purpose.
Silly to argue, but $TERM has a certain expected semantics in many or
most environments -- Terminal Characteristics.
Arguably, RXVT should set TERM to "rxvt" (or xterm, or color-xterm) to
allow a program to use, e.g. pdcurses sensibly.
Since Cmd.exe doesn't necessarily handle all VT-220 escape language, it
should set, probably, "dumb".
Console2 -- depends on what escapes it supports.
>> IMNSHO, however, the _right_ choice would be to set "MACHTYPE" to
>> whatever a configure scriipt expects when parsing an MSYS build.
>>   It's no "trick" at all -- MACHTYPE already has the desired
>> semantics.
> A "not so humble opinion" maybe, but perhaps not so astute!  As I've
> already pointed out in a previous follow-up, $OSTYPE would likely be
> a better choice, (it would tell you "msys" directly, unlike $MACHTYPE
> which you would have to parse further), but it and $MACHTYPE alike,
> exhibit their own particular disadvantages:--a
Thanks, I didn't know about OSTYPE -- hadn't seen it before whereas I
see plenty of MACHTYPE.  Even if it's a bashism, rather than an artifact
of the *nix confgure--make build protocol, it's something I can set to
an appropriate value.
> * Both are bash-isms, therefore not guaranteed to be defined in any
>    context, other than within a bash shell.
>
> * Neither is exported, (unless you make it so), and therefore may
>    not be visible in your emacs process context, even if launched by
>    a bash shell; (they will be automatically recreated within any
>    bash shell you subsequently spawn, but they don't propagate).
Yeah, but I can set it "appropriately," meaning a value such as the *nix
configure scripts would produce for the same environment.  Anyway,
"reasonable minds may disagree."

--

David A. Cobb -- computing t-rex


------------------------------------------------------------------------------
_______________________________________________
Mingw-msys mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mingw-msys
Reply | Threaded
Open this post in threaded view
|

Re: Using MSYS as Emacs shell

hydracat
In reply to this post by David A. Cobb-2
I tried doing this by executing c:/msys/1.0/bin/bash.exe at work
(it's old, so I'm going to try to install a newer system at home).

I was able to set the emacs string to run:

setq(explicit-shell-file-name "c:/msys/1.0/bin/bash.exe")

but then bash is run without the path set correctly.  The batch file executes:

bash --login --i

but I can't make that the string.  So I'm wondering whether emacs has a facility to pass arguments to the shell, or whether there is some other reasonable way of getting the shell to run.

The next step is I want to be able to run gdb under emacs.  I assume that also requires launching a shell.

So David, if you figured this out in the end, or if someone else could enlighten me, I'd appreciate it!

Incidentally David, you indicated that you have emacs under Cygwin.  Is that text only, or do you have a way of getting a graphical emacs running?

Thanks!