Re: Using MSYS as Emacs shell [Partially solved]
"David A. Cobb" <[email protected]>
| Newsgroups | gmane.comp.gnu.mingw.msys |
|---|---|
| Message-ID | <[email protected]> |
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 ------------------------------------------------------------------------------