From: dkcombs@panix.com (David Combs)
To: help-gnu-emacs@gnu.org
Subject: Re: grep and sort
Date: Sun, 5 Sep 2010 02:27:27 +0000 (UTC) [thread overview]
Message-ID: <i5uv6f$9g7$1@reader1.panix.com> (raw)
In-Reply-To: i4b4o3$e53$1@speranza.aioe.org
Not as a solution to this problem, but related to using
grep and getting an *Occur* like buffer.
Say I want to do a grep-like operation, but then
further filter it or process it in some way,
and M-x grep doesn't do just what I want.
Add in that I'm doing this on more than one file,
but want to be able to click-then-be-taken-to
in one long file. Well, like this:
So, I use the grep *program*,
egrep -n -H regexp file file file ... > loc.txt
and maybe in that, for easier viewing, I upper-case
some words, like print --> PRINT, etc.
Now, that -H gave me the filenames:
foo.txt:480:Hello there
foo.txt:9010:what are you doing here?
bar.txt:22:yada yada here yada
...
etc.
That's what's in loc.txt.
THEN, in emacs, I do M-x get
and instead of filling in a regexp or whatever,
I give it this string: cat loc.txt
Works like a charm!
David
prev parent reply other threads:[~2010-09-05 2:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-15 14:29 grep and sort Antony
2010-08-15 14:58 ` David Kastrup
2010-08-16 9:22 ` Antony
[not found] ` <i4b4o3$e53$1@speranza.aioe.org>
2010-09-05 2:27 ` David Combs [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='i5uv6f$9g7$1@reader1.panix.com' \
--to=dkcombs@panix.com \
--cc=help-gnu-emacs@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.