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


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 8653 <at> debbugs.gnu.org
Subject: bug#8653: 24.0.50; `M-x grep' output converts `~' to /cygdrive/c/...
Date: Wed, 11 May 2011 21:54:32 -0300
> M-x grep foo ~/mydir/f*.el
> results in this kind of output in buffer *grep*:
 
> /cygdrive/c/mydir/foobar.el:203: blah blah foo blah
 
Let me add to Eli's answer [tho, as someone whose experience with
Windows only goes as far as "install firefox&putty to access non-Windows
machines"]: IIUC the expansion of ~ (to something like "C:/...") is
performed by the shell used to run grep, and the conversion to
"/cygdrive/c/..." is performed by the particular grep you use
(presumably cygwin's).

So to fix the problem at hand we need:
- add something like cygwin-mount.el to Emacs.
- change grep.el to use abbreviate-file-name.

Contrary to Eli, I'm not fundamentally opposed to including something
like cygwin-mount.el in Emacs.  As for changing grep.el, it could be
a valid option, tho it would either have to be a non-default setting, or
be done carefully to minimize the performance impact (M-x grep is
already slowish).

Of course, another take on it is to change the problem: maybe we could
make it easier to run an equivalent command with relative file names.
Not knowing how/why you ended up with "M-x grep foo ~/mydir/f*.el",
I don't know what could make it easier.


        Stefan




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.