[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep-mode should print default-directory (again)
From: |
Nick Roberts |
Subject: |
Re: grep-mode should print default-directory (again) |
Date: |
Tue, 10 Apr 2007 11:53:26 +1200 |
> compilation-mode now sets compilation-directory and prints it as a
> file-local variable. ISTR it used to do this for default-directory.
> grep-mode does the same but, in this case I think default-directory is
> more relevant.
>
> Could you explain why you think so? Won't both achieve the same
> result: finding the grep hits in the right place?
AFAICS compilation-directory is just used with recompile and it gets set by
M-x compile (through default-directory).
If I do M-x compile when default-directory has the value "/home/nickrob/" I
get:
-*- mode: compilation; compilation-directory: "/home/nickrob/" -*-
If I then do M-x dired to another directory /home/nickrob/C say, then
default-directory has the value "/home/nickrob/C", but when I do grep from
there e.g
Run grep (like this): grep -nH -e enum *.c
I get:
-*- mode: grep; compilation-directory: "/home/nickrob/" -*-
but I want to know the directory that grep was started from. Why should I
be interested in the current value of compilation-directory here?
--
Nick http://www.inet.net.nz/~nickrob