GNU bug report logs - #8653
24.0.50; `M-x grep' output converts `~' to /cygdrive/c/...

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Wed, 11 May 2011 15:34:02 UTC

Severity: wishlist

Tags: notabug

Found in version 24.0.50

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


Message #17 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andy Moreton <andrewjmoreton <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#8653: 24.0.50;
	`M-x grep' output converts `~' to /cygdrive/c/...
Date: Thu, 12 May 2011 12:52:18 +0100
On Wed 11 May 2011, Drew Adams wrote:

>> > Seems like Emacs & grep should be able to keep `~/' instead 
>> > of printing `/cygdrive/c/'.  The current behavior is less
>> > readable and uses 10 more characters.
>> 
>> Emacs behaves like what you see on all systems: grep reports the
>> absolute file names, and Emacs does not convert them back to ~/foo.
>> 
>> But even if we make that change, I doubt that you will see ~/foo in
>> your case, because Emacs doesn't know about the /cygdrive/c/ wizardry,
>> unless cygwin-mount will help it.  And cygwin-mount isn't part of
>> Emacs, so we cannot fix it to support that.
>> 
>> And Grep cannot keep the ~/foo notation at all, because ~ is a shell
>> construct; applications and filesystems don't understand it, in
>> general (Emacs is an exception).
>
> Yes, that's what I figured you'd say.  Feel free to close the bug.
> Or feel free to keep it open as an enhancement request.

I use cygwin-mount and don't see this problem.

 Make sure HOME is set in the Windows environment before launching emacs
(e.g. HOME=C:\home\ajm), that Cygwin is installed correctly at
C:\cygwin, and that the Cygwin mount table is correct (in my case with
/home mounted at C:\home). Cygwin will translate HOME to a POSIX path
automatically, and grep will be happy.

    AndyM





This bug report was last modified 8 years and 60 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.