From: Nick Roberts <nickrob@snap.net.nz>
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: grep-mode should print default-directory (again)
Date: Tue, 10 Apr 2007 11:53:26 +1200 [thread overview]
Message-ID: <17946.53750.886235.857427@farnswood.snap.net.nz> (raw)
In-Reply-To: <E1Hb2jI-0005Cp-0r@fencepost.gnu.org>
> 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
next prev parent reply other threads:[~2007-04-09 23:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-09 12:07 grep-mode should print default-directory (again) Nick Roberts
2007-04-09 22:52 ` Richard Stallman
2007-04-09 23:53 ` Nick Roberts [this message]
2007-04-13 1:42 ` Richard Stallman
2007-04-13 13:49 ` Stefan Monnier
2007-04-13 21:43 ` Richard Stallman
2007-04-13 15:12 ` Chong Yidong
2007-04-13 19:10 ` Stefan Monnier
2007-04-13 21:54 ` Nick Roberts
2007-04-15 13:59 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17946.53750.886235.857427@farnswood.snap.net.nz \
--to=nickrob@snap.net.nz \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).