22

When I try to use ediff-revision under Emacs 23.2.1 for a CVS-managed file, I receive the following error in the *ediff-errors* frame, instead of commencing directly to the ediff results:

cygwin warning:
  MS-DOS style path detected: c:/Users/BILL/AppData/Local/Temp/misc.cpp.~1.10~
  Preferred POSIX equivalent is: /cygdrive/c/Users/BILL/AppData/Local/Temp/misc.cpp.~1.10~
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

My problem is that I have already set that CYGWIN environment variable option "nodosfilewarning", so I have no idea why I am receiving this error.

In fact, I can verify this right from an inferior shell under the same Emacs instance:

> set | grep -i nodos
CYGWIN=nodosfilewarning

I am running Cygwin 1.7.9-1 under Windows 7, in case this may be relevant (and I never had this problem before upgrading from Cygwin 1.5 to 1.7).

Any idea how to get rid of this error?

P.S. A subsequent call to ediff-revision succeeds without triggering this warning.

WinWin
  • 7,493
  • 10
  • 44
  • 53

3 Answers3

33

The CYGWIN variable is parsed when the first process in a Cygwin process tree is invoked. Hence, setting it in .bashrc or something like that is too late. A good place to set it is in the global Windows environment, under Control Panel->System->Advanced->Environment Variables.

ak2
  • 6,629
  • 31
  • 27
  • Thank you! Indeed, I was exporting that env var in `.bashrc`. Once I moved it to the global Windows environment, everything works exactly as it used to work before I upgraded Cygwin. – WinWin Jan 31 '12 at 15:24
  • Doling out propers would be, well, proper. Props! This is one of those things that never really *affected me* per se, but annoyed me subconsciously when I saw it. – thynctank Aug 20 '14 at 18:47
8

I added (setenv "CYGWIN" "nodosfilewarning") to setup-cygwin.el. That seems to take care of the problem without, AFAICT, creating other problems. I also filed Emacs bug #14541 for this.

Drew
  • 29,895
  • 7
  • 74
  • 104
3

From within emacs, you may also:

  • M-x setenv
  • CYGWIN
  • nodosfilewarning

as an immediate alternative to altering setup-cygwin.el.

Greg
  • 51
  • 6