delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/10/02/11:03:31

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Tue, 2 Oct 2001 15:57:49 +0100
Message-ID: <8313-Tue02Oct2001155749+0100-starksb@ebi.ac.uk>
X-Mailer: emacs 20.7.1 (via feedmail 9-beta-7 I);
VM 6.92 under Emacs 20.7.1
From: David Starks-Browning <starksb AT ebi DOT ac DOT uk>
MIME-Version: 1.0
To: Matt Landau <matt AT atg DOT com>
CC: cygwin AT cygwin DOT com
Subject: Re: bash 2.04 can't complete ~/name if $HOME set to
c:/users/foo?
In-Reply-To: <5.1.0.14.2.20011002102745.00a6df08@pop.atg.com>
References: <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20011001192343 DOT 00a74568 AT pop DOT atg DOT com>
<5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20011002102745 DOT 00a6df08 AT pop DOT atg DOT com>

On Tuesday 2 Oct 01, Matt Landau writes:
> At 05:37 AM 10/2/2001, David Starks-Browning wrote:
> >If your non-Cygwin application (like Emacs) requires HOME be set in a
> >non-Cygwin way, then don't start emacs from your Cygwin bash shell.
> 
> Let me clarify the problem.
> 
> Emacs doesn't care what $HOME is set to, it cares what path it sees on the 
> command line.  The issue is that bash, by default, expands ~/filename to a 
> posix-style path, resulting in commands like "emacs /c/users/matt/.bashrc", 
> which doesn't work for any non-Cygwin program.

OK.  But in fact, doesn't Emacs care about $HOME so it can find .emacs
or _emacs?

> Saying "don't run non-Cygwin programs from bash" isn't a thrilling answer; 
> an interactive shell is most useful when you can use it as your shell for 
> *everything*.
> 
> There is a half-hearted workaround, which is to reset HOME to a win32-style 
> path in .bashrc so that ~/.bashrc expands to c:/users/matt/.bashrc (since 
> cygwin programs understand win32-style paths, there's little reason not to 
> do this), but it breaks bash's completion.  That's the real bug I was 
> asking about.  It's not clear to me why bash should be able to expand 
> posix-style paths but not win32-style paths.

Probably because bash is a unix program, not a Windows program?
Without looking at the bash source code (bad thing to say on this
list, I know), your complaint sounds like a feature request, not a bug
report.

It's not *always* possible to make $HOME a win32 path.  I would expect
ssh and rsh, for example, to interpret the colon as host:path.

> I suppose another workaround is to define a shell function that turns 
> "emacs filename" into "emacs `cygpath -w filename`", converting all names 
> back to win32-style paths before emacs ever sees them, but having to do 
> this for every non-cygwin application I ever run from the shell is going to 
> get tedious.

More tedious than not having Cygwin & bash at all? :-)

(Sorry, couldn't resist...)

Seriously though, point taken, but I don't know that it's enough to
motivate Cygwin developers (and/or Chet Ramey and/or ...) to take it
on board.  (I'm not one, and I shouldn't speak for them.)

For Emacs, have you looked into cygwin-mount.el?  Here is one
reference: <http://www.cygwin.com/ml/cygwin/2001-05/msg00684.html>.

Regards,
David


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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