delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/08/11/10:25:04

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
To: cygwin AT cygwin DOT com, ericblake AT comcast DOT net (Eric Blake)
Subject: Re: Programatically finding value of "cygdrive" prefix
Mail-Copies-To: never
Reply-To: sds AT gnu DOT org
X-Attribution: Sam
X-Disclaimer: You should not expect anyone to agree with me.
From: Sam Steingold <sds AT gnu DOT org>
In-Reply-To: <081120051410.11364.42FB5C3D0008A6CD00002C6422064246130A050E040D0C079D0A@comcast.net> (Eric Blake's message of "Thu, 11 Aug 2005 14:10:05 +0000")
References: <081120051410 DOT 11364 DOT 42FB5C3D0008A6CD00002C6422064246130A050E040D0C079D0A AT comcast DOT net>
Mail-Followup-To: cygwin AT cygwin DOT com, ericblake AT comcast DOT net (Eric Blake)
Date: Thu, 11 Aug 2005 10:24:01 -0400
Message-ID: <upsskk0vy.fsf@gnu.org>
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt)
MIME-Version: 1.0

> * Eric Blake <revpoynxr AT pbzpnfg DOT arg> [2005-08-11 14:10:05 +0000]:
>
>> > mount -p | sed -nr '2s/([^ ]) +\S+ +\S+$/\1/p'
>> 
>> how about a version that strips the leading slash?
>
> mount -p | sed -nr '2s,/([^ ]) +\S+ +\S+$,\1,p'

that's what I also tried before sending my e-mail.
it does not print anything.

>> while we are at it, how do non-cygwin programs supposed to handle this
>> /cygdrive stuff?
>
> If you are invoking a non-cygwin program, you can use cygpath to
> perform the conversion.  Write wrapper shell scripts to do that for
> you if you commonly invoke non-cygwin programs from within cygwin.

what if shell scripts that I do not control invoke emacs in ways that I
do not control?

>> shell scripts mindlessly transfered from unix to cygwin do not bother to
>> use cygpath before passing pathnames to external programs.
>> native Emacs or vim do not appreciate /cygdrive prefixes.
>> it's easier to tell Emacs how to handle /cygdrive than to fix every
>> elisp Makefile that is being distributed.
>> that brings me to suggest that this "cygdrive" be made available in the
>> registry (which cygwin does not use at all, so, I guess, this is not
>> going anywhere...)
>
> Actually, the cygdrive prefix is part of mount(1), so it IS currently
> stored in the registry.  But the registry interface to how mount(1)
> stores its information is intentionally undocumented, so that mount(1)
> will work even if its use of the registry changes in the future.

I cannot find either "cygdrive" or "cygwin" in the registry (using regedit)

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.mideasttruth.com/>
<http://www.openvotingconsortium.org/> <http://www.palestinefacts.org/>
The only intuitive interface is the nipple.  The rest has to be learned.

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

- Raw text -


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