[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [h-e-w] Another problem with MinGW shell in Emacs: directory trackin

From: Kai Grossjohann
Subject: Re: [h-e-w] Another problem with MinGW shell in Emacs: directory tracking
Date: Thu, 16 Oct 2003 22:18:09 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (berkeley-unix)

Stephen Leake <address@hidden> writes:

> Kai Grossjohann <address@hidden> writes:
>> In Emacs, I set explicit-shell-file-name to "sh.exe", the args to
>> "--login" and "-i".  I then do M-x shell RET.  Good.  I change to a
>> directory ~/foo.  Type C-x C-f bar.c RET.  Good.
>> Change to another directory e:/baz.  Type C-x C-f...  Bad!
> Two points. First, a matter of style. Don't use the shell to change
> directories; First do C-x C-f, _then_ do e:/baz/... That always works.

Why shouldn't I use the shell?  I like to use the shell!

(In fact, I want to make it so that typing "vi foo.c" at the shell
gets intercepted by shell.el to invoke find-file behind the scenes.
Learned to love this when using eshell.  Might be fun to play with.)

On a more serious note, I usually cd somewhere, then invoke some
command, then cd another place, invoke more commands, and only then
do I notice that I need to look at a file.

> Second, what you did works for me when I use Cygwin bash as the
> sub-shell. I haven't tried it with Mingw sh; maybe that's a
> difference.

Hm.  Interesting.  How come?  Is your Emacs cygwinized?  That would
cause it to grok Posix paths.  Or does Cygwin bash print "e:/foo"
when you enter "pwd"?

> Ok, three points; there is an emacs library that handles cygwin paths;
> maybe it handles mingw paths as well. cygmount.el, or something; I
> don't use it.

Ah, cygmount.  Totally forgot about it.  Hm.  Hmmm...  That allows
Emacs to grok /c/foo style paths.  Yeah, that might work.

Maybe I'm trying the wrong way to get Unixish behavior from Windows.
Should I try to get used to cmd.exe and learn how to use its
conditional constructs and looping?

Or maybe I should migrate to a more fully cygwinized environment.
Then I would use Windows only for Outlook and Word.  Is this a better


reply via email to

[Prev in Thread] Current Thread [Next in Thread]