On Tuesday 2 Oct 01, Matt Landau writes: > At 05:37 AM 10/2/2001, David Starks-Browning wrote: > >If your non-Cygwin application (like Emacs) requires HOME be set in a > >non-Cygwin way, then don't start emacs from your Cygwin bash shell. > > Let me clarify the problem. > > Emacs doesn't care what $HOME is set to, it cares what path it sees on the > command line. The issue is that bash, by default, expands ~/filename to a > posix-style path, resulting in commands like "emacs /c/users/matt/.bashrc", > which doesn't work for any non-Cygwin program.
OK. But in fact, doesn't Emacs care about $HOME so it can find .emacs or _emacs? > Saying "don't run non-Cygwin programs from bash" isn't a thrilling answer; > an interactive shell is most useful when you can use it as your shell for > *everything*. > > There is a half-hearted workaround, which is to reset HOME to a win32-style > path in .bashrc so that ~/.bashrc expands to c:/users/matt/.bashrc (since > cygwin programs understand win32-style paths, there's little reason not to > do this), but it breaks bash's completion. That's the real bug I was > asking about. It's not clear to me why bash should be able to expand > posix-style paths but not win32-style paths. Probably because bash is a unix program, not a Windows program? Without looking at the bash source code (bad thing to say on this list, I know), your complaint sounds like a feature request, not a bug report. It's not *always* possible to make $HOME a win32 path. I would expect ssh and rsh, for example, to interpret the colon as host:path. > I suppose another workaround is to define a shell function that turns > "emacs filename" into "emacs `cygpath -w filename`", converting all names > back to win32-style paths before emacs ever sees them, but having to do > this for every non-cygwin application I ever run from the shell is going to > get tedious. More tedious than not having Cygwin & bash at all? :-) (Sorry, couldn't resist...) Seriously though, point taken, but I don't know that it's enough to motivate Cygwin developers (and/or Chet Ramey and/or ...) to take it on board. (I'm not one, and I shouldn't speak for them.) For Emacs, have you looked into cygwin-mount.el? Here is one reference: <http://www.cygwin.com/ml/cygwin/2001-05/msg00684.html>. Regards, David -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
