delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/11/30/16:09:09

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Date: Wed, 30 Nov 2011 15:08:46 -0600 (CST)
From: Tim McDaniel <tmcd AT panix DOT com>
To: cygwin AT cygwin DOT com
Subject: Emacs in Cygwin: (file-exists-p "c:/")?
Message-ID: <Pine.NEB.4.64.1111301503150.16633@panix1.panix.com>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

I dunno whether anyone here know about Emacs, but I thought I would
ask.

In a previous setup (Windows XP, 32-bit), I believe that running the
Emacs function
     (file-exists-p "c:/")
produced t.

Now, with the latest Cygwin, Windows 7, 64-bit, emacs-version
"23.3.1",
     (file-exists-p "c:/")
     nil
     (file-exists-p "c:\\")
     nil
I notice it because it broke some code, my .emacs startup file to be
precise.  It was a quick and easy way to check whether it was running
under Windows.

I have a workaround,
     (file-exists-p "/mnt/c")
but that only "works" because I "know" that I have changed the drive
prefix from /cygdrive to /mnt.

Can it be made to work again?  Any suggestions on how to tell in Emacs
whether I'm running under Windows?

-- 
Tim McDaniel, tmcd AT panix DOT com

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019