Discussion:
[Mingw-users] dumb newbie question
mike
2017-07-16 21:28:11 UTC
Permalink
Hello

So I've installed MinGW and MSYS okay and I can run MSYS and it sees the
MinGW executables just fine AFAICT but I can't figure out how to change
the MinGW pwd or cwd in the MSYS shell to my Windows home
directory/folder (C:\Users\Mike) which is where my source to be built
will be.

It doesn't seem to work like it does if I execute for example

(defun cygwin-shell ()
"Run cygwin bash in shell mode."
(interactive)
(let ((explicit-shell-file-name "C:/cygwin/bin/bash"))
(call-interactively 'shell)))

in the *scratch* buffer in native Windows Gnu Emacs where I would just
do "M-x cygwin-shell" and then do "cd /cygdrive/c" in the shell but then
since MSYS is presumably different from Cygwin (although I know it's
based on it) I wouldn't expect it to anyway and I can't remember how to
do it in straight recent Cygwin outside of Emacs either cause everything
changed a while back.

I've tried to find the answer in the MinGW wiki (which I think is great
BTW) but I can't find it.

Thanks very much in advance for any help. Once again I assume I am
missing the obvious.

Mike
--
I *AM* a unique and special snowflake
Eli Zaretskii
2017-07-17 02:30:55 UTC
Permalink
Date: Sun, 16 Jul 2017 22:28:11 +0100
So I've installed MinGW and MSYS okay and I can run MSYS and it sees the MinGW executables just fine
AFAICT but I can't figure out how to change the MinGW pwd or cwd in the MSYS shell to my Windows home
directory/folder (C:\Users\Mike) which is where my source to be built will be.
The MSYS notation for C:\Users\Mike is /c/Users/Mike. Is that the
answer you were looking for?
It doesn't seem to work like it does if I execute for example
(defun cygwin-shell ()
"Run cygwin bash in shell mode."
(interactive)
(let ((explicit-shell-file-name "C:/cygwin/bin/bash"))
(call-interactively 'shell)))
in the *scratch* buffer in native Windows Gnu Emacs where I would just do "M-x cygwin-shell" and then do
"cd /cygdrive/c" in the shell but then since MSYS is presumably different from Cygwin (although I know it's
based on it) I wouldn't expect it to anyway and I can't remember how to do it in straight recent Cygwin outside
of Emacs either cause everything changed a while back.
This is OT here, but I won't recommend using the MSYS shell together
with a native Windows build of Emacs, as they have subtle
incompatibilities, e.g. regarding file names.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
MinGW-***@lists.sourceforge.net

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-***@lists.sourceforge.net?subject=unsubscribe
mike
2017-07-17 02:48:45 UTC
Permalink
Post by Eli Zaretskii
Date: Sun, 16 Jul 2017 22:28:11 +0100
So I've installed MinGW and MSYS okay and I can run MSYS and it sees the MinGW executables just fine
AFAICT but I can't figure out how to change the MinGW pwd or cwd in the MSYS shell to my Windows home
directory/folder (C:\Users\Mike) which is where my source to be built will be.
The MSYS notation for C:\Users\Mike is /c/Users/Mike. Is that the
answer you were looking for?
That is exactly the answer I was looking for. Just tried it. Thank you
very much.
Post by Eli Zaretskii
It doesn't seem to work like it does if I execute for example
(defun cygwin-shell ()
"Run cygwin bash in shell mode."
(interactive)
(let ((explicit-shell-file-name "C:/cygwin/bin/bash"))
(call-interactively 'shell)))
in the *scratch* buffer in native Windows Gnu Emacs where I would just do "M-x cygwin-shell" and then do
"cd /cygdrive/c" in the shell but then since MSYS is presumably different from Cygwin (although I know it's
based on it) I wouldn't expect it to anyway and I can't remember how to do it in straight recent Cygwin outside
of Emacs either cause everything changed a while back.
This is OT here, but I won't recommend using the MSYS shell together
with a native Windows build of Emacs, as they have subtle
incompatibilities, e.g. regarding file names.
Oh aye I know all about that but since you raised the issue what would
you use to do editing while using MSYS? Vim? Pico? Nano?

Thank you very much for your assistance

Best regards
Mike
Post by Eli Zaretskii
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/mingw-users
--
I *AM* a unique and special snowflake


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
MinGW-***@lists.sourceforge.net

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-***@lists.sourceforge.net?subject=unsubscribe
mike
2017-07-17 13:38:35 UTC
Permalink
Post by mike
Post by Eli Zaretskii
Date: Sun, 16 Jul 2017 22:28:11 +0100
So I've installed MinGW and MSYS okay and I can run MSYS and it sees
the MinGW executables just fine
AFAICT but I can't figure out how to change the MinGW pwd or cwd in
the MSYS shell to my Windows home
directory/folder (C:\Users\Mike) which is where my source to be built will be.
The MSYS notation for C:\Users\Mike is /c/Users/Mike. Is that the
answer you were looking for?
That is exactly the answer I was looking for. Just tried it. Thank you
very much.
Post by Eli Zaretskii
It doesn't seem to work like it does if I execute for example
(defun cygwin-shell ()
"Run cygwin bash in shell mode."
(interactive)
(let ((explicit-shell-file-name "C:/cygwin/bin/bash"))
(call-interactively 'shell)))
in the *scratch* buffer in native Windows Gnu Emacs where I would
just do "M-x cygwin-shell" and then do
"cd /cygdrive/c" in the shell but then since MSYS is presumably
different from Cygwin (although I know it's
based on it) I wouldn't expect it to anyway and I can't remember how
to do it in straight recent Cygwin outside
of Emacs either cause everything changed a while back.
This is OT here, but I won't recommend using the MSYS shell together
with a native Windows build of Emacs, as they have subtle
incompatibilities, e.g. regarding file names.
Oh aye I know all about that but since you raised the issue what would
you use to do editing while using MSYS? Vim? Pico? Nano?
The only issue here is that of a path POSIX versus WINDOWS. If you
don't create files that contain POSIX paths that are then executed by
your native Emacs you should be fine.
I use native gvim for my editing choice.
Thanks very much for that important feedback. I'm sure I'm going to run
up against that issue in like the next 24 hours. (Sometimes the wheels
of time run slow.)

Best

Mike
--
I *AM* a unique and special snowflake


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
MinGW-***@lists.sourceforge.net

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-***@lists.sourceforge.net?subject=unsubscribe
mike
2017-07-17 13:47:24 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I use native gvim for my editing choice.
As did I, back in the days when I still used Windows. I recall having
shell aliases, defined in $HOME/.bashrc, so that I could launch it from
the MSYS shell, but that was around 4 years ago, and I no longer recall
the details.
- --
Regards,
Keith.
Thanks very much Keith. I suspected that everybody would use (g)vim.

Best
Mike
Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
iQIcBAEBAgAGBQJZbL2TAAoJEMCtNsY0flo/4sAP/RbFeg2LK03BxldiEsImLq+m
hFYhl4bdGLdg7J/3k+cskMyBWuXFF7dyNIOy75d+mmcLZnJg5tH2Uq+F+t+pBSj0
sqsfFAk6aNho09xze0kQajNy4pSivKquAJVJJCa4xaoHtsEg8StXHFGMqGR8isHm
OH9CyVGfXF1TySlnVVRhFmT/D7NadvGrdXYHsPuBAVCbGG3bpU3MNlWPYmlh6Xmb
+XR1rEOPUYup0Hjgvn2/qU2hTwI+juTxQvZQq+Ulewjx8fTjrRDKT6s76J3/715v
dv0mJGMRD345pqUbtCGYyhwDaRJVlqVONm9ix5XuG4Zsvoy40Y4PxZcrqa04l6ts
WUz3Qog0FycQtV41oysvYhmE/aqfGIPLOW1HEFqDYAgEDgnawsckiVHZSU5xh1he
gm4a3gROqY7VrAwci+xfLvn5MW4OnVw2BRJmis+AQoIEXsSPd1b5gsf49KH4NGWw
pHQ45OrU5VNFX0FZsbXhWlWhWSxSO5gzB9iZA8rSEsOhr809UbbizDWuKsZ3/hUp
mAGcINHF9Vrl7k6IZt3LBT/B5QGvDHgV+YtM9AjHi4REEF+yioBKoyyIstxMZ7o3
ORmPgFlYEQcL/8dVgJploXprhd23cciju4lB1p9dcZe3aCo5K/xrEC8jbRkOR1s9
1zvZDc32xUjkq2ce0qZ7
=OV/D
-----END PGP SIGNATURE-----
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/mingw-users
--
I *AM* a unique and special snowflake


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
MinGW-***@lists.sourceforge.net

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-***@lists.sourceforge.net?subject=unsubscribe
Eli Zaretskii
2017-07-17 14:25:25 UTC
Permalink
Date: Mon, 17 Jul 2017 03:48:45 +0100
Post by Eli Zaretskii
This is OT here, but I won't recommend using the MSYS shell together
with a native Windows build of Emacs, as they have subtle
incompatibilities, e.g. regarding file names.
Oh aye I know all about that but since you raised the issue what would
you use to do editing while using MSYS? Vim? Pico? Nano?
No, I simply never use MSYS except for building and testing MinGW
packages. For any other work on Windows I use MinGW ports of whatever
utilities I need.

There's only one editor for me, and that is Emacs.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
MinGW-***@lists.sourceforge.net

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-***@lists.sourceforge.net?subject=unsubscribe
mike
2017-07-17 20:53:28 UTC
Permalink
Post by Eli Zaretskii
Date: Mon, 17 Jul 2017 03:48:45 +0100
Post by Eli Zaretskii
This is OT here, but I won't recommend using the MSYS shell together
with a native Windows build of Emacs, as they have subtle
incompatibilities, e.g. regarding file names.
Oh aye I know all about that but since you raised the issue what would
you use to do editing while using MSYS? Vim? Pico? Nano?
No, I simply never use MSYS except for building and testing MinGW
packages. For any other work on Windows I use MinGW ports of whatever
utilities I need.
There's only one editor for me, and that is Emacs.
I agree that this is OT here so I suggest at this point that we move
this discussion to the help-emacs-windows
<http://lists.gnu.org/mailman/listinfo/help-emacs-windows> mailing list
if we are to continue it. I would think that this discussion would be
of general interest there although I'm not exactly sure how to move the
discussion.

Best
Mike
Post by Eli Zaretskii
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org!http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/mingw-users
--
I *AM* a unique and special snowflake
Will Parsons
2017-07-17 22:04:50 UTC
Permalink
Post by mike
Post by Eli Zaretskii
Date: Mon, 17 Jul 2017 03:48:45 +0100
Post by Eli Zaretskii
This is OT here, but I won't recommend using the MSYS shell together
with a native Windows build of Emacs, as they have subtle
incompatibilities, e.g. regarding file names.
Oh aye I know all about that but since you raised the issue what would
you use to do editing while using MSYS? Vim? Pico? Nano?
No, I simply never use MSYS except for building and testing MinGW
packages. For any other work on Windows I use MinGW ports of whatever
utilities I need.
There's only one editor for me, and that is Emacs.
I agree that this is OT here so I suggest at this point that we move
this discussion to the help-emacs-windows
<http://lists.gnu.org/mailman/listinfo/help-emacs-windows> mailing list
if we are to continue it. I would think that this discussion would be
of general interest there although I'm not exactly sure how to move the
discussion.
It's a bit late to take the high road of not getting involved in
discussions of editors, don't you think? E.g.:

On Sunday, 16 Jul 2017 10:48 PM -0400, mike wrote:
...
Post by mike
Oh aye I know all about that but since you raised the issue what would
you use to do editing while using MSYS? Vim? Pico? Nano?
On Monday, 17 Jul 2017 9:47 AM -0400, mike wrote:
...
Post by mike
Thanks very much Keith. I suspected that everybody would use (g)vim.
Just sayin'...
--
Will


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
MinGW-***@lists.sourceforge.net

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-***@lists.sourceforge.net?subject=unsubscribe
Eli Zaretskii
2017-07-17 14:32:51 UTC
Permalink
Date: Mon, 17 Jul 2017 09:16:31 -0400
Post by mike
Post by Eli Zaretskii
This is OT here, but I won't recommend using the MSYS shell together
with a native Windows build of Emacs, as they have subtle
incompatibilities, e.g. regarding file names.
Oh aye I know all about that but since you raised the issue what would
you use to do editing while using MSYS? Vim? Pico? Nano?
The only issue here is that of a path POSIX versus WINDOWS. If you
don't create files that contain POSIX paths that are then executed by
your native Emacs you should be fine.
That's not the only issue. Another one is that Emacs supports
standard Windows shells and the Cygwin Bash, but it doesn't support
the MSYS Bash, so it might become confused when invoking shell
commands, and fail to tweak the command-line arguments quoting
properly.

A variant of that is when you invoke an MSYS Sed, say, with an editing
command that starts with a slash -- MSYS might decide that it's a file
name, and convert it to a backslash form, which will, of course, cause
weird error messages.

Another potential gotcha is with invoking async subprocesses from
Emacs: if the program they run is an MSYS program, it could have its
own peculiar ideas, not shared by Emacs, whether its stdin is a
console or not.

The value of PATH is another potential issue: the value known to Emacs
will almost certainly different from the one known to MSYS Bash, so
invoking shell commands might mysteriously fail, although Emacs did
find the command along its PATH.

And there may be some others.

Kids, don't try this at home!

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
MinGW-***@lists.sourceforge.net

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-***@lists.sourceforge.net?subject=unsubscribe
Loading...