[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Stefan Monnier
Subject: bug#8653: 24.0.50; `M-x grep' output converts `~' to /cygdrive/c/...
Date: Wed, 11 May 2011 21:54:32 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]