From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: dkcombs@panix.com (David Combs) Newsgroups: gmane.emacs.help Subject: Re: grep and sort Date: Sun, 5 Sep 2010 02:27:27 +0000 (UTC) Organization: Public Access Networks Corp. Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1291866596 658 80.91.229.12 (9 Dec 2010 03:49:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2010 03:49:56 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 09 04:49:52 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQXVu-00066H-U5 for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 04:49:51 +0100 Original-Received: from localhost ([127.0.0.1]:34139 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQXVu-0006SX-DY for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 22:49:50 -0500 Original-Path: usenet.stanford.edu!panix!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-NNTP-Posting-Host: panix3.panix.com Original-X-Trace: reader1.panix.com 1283653647 9735 166.84.1.3 (5 Sep 2010 02:27:27 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Sun, 5 Sep 2010 02:27:27 +0000 (UTC) X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Original-Xref: usenet.stanford.edu gnu.emacs.help:181152 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:76581 Archived-At: 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