From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Opening files from a command Date: Sat, 1 Nov 2008 14:07:09 -0700 Message-ID: <003d01c93c65$ce170b70$0200a8c0@us.oracle.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1225573653 7042 80.91.229.12 (1 Nov 2008 21:07:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Nov 2008 21:07:33 +0000 (UTC) To: "'Decebal'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 01 22:08:36 2008 connect(): Connection refused 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.50) id 1KwNhz-0007pd-7f for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Nov 2008 22:08:35 +0100 Original-Received: from localhost ([127.0.0.1]:57938 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KwNgs-000415-Hg for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Nov 2008 17:07:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KwNga-00040x-Pi for help-gnu-emacs@gnu.org; Sat, 01 Nov 2008 17:07:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KwNgZ-00040l-98 for help-gnu-emacs@gnu.org; Sat, 01 Nov 2008 17:07:08 -0400 Original-Received: from [199.232.76.173] (port=50739 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KwNgZ-00040i-45 for help-gnu-emacs@gnu.org; Sat, 01 Nov 2008 17:07:07 -0400 Original-Received: from acsinet12.oracle.com ([141.146.126.234]:47017) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KwNgY-0005Fg-UK for help-gnu-emacs@gnu.org; Sat, 01 Nov 2008 17:07:07 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by acsinet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mA1L6sRN008776 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 1 Nov 2008 21:06:56 GMT Original-Received: from rgmgw1.us.oracle.com (rgmgw1.us.oracle.com [138.1.186.110]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mA1L7KKg029279 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 1 Nov 2008 21:07:21 GMT Original-Received: from acsmt705.oracle.com (acsmt705.oracle.com [141.146.40.83]) by rgmgw1.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id mA1L6uFX004820; Sat, 1 Nov 2008 15:06:56 -0600 Original-Received: from dradamslap1 (/24.23.165.218) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 01 Nov 2008 21:06:55 +0000 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 Thread-Index: Ack8YmqeFFuLu9hCSJ69PfZ65RNBuwAAqo3A X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Source-IP: acsinet15.oracle.com [141.146.126.227] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090207.490CC4F5.015D:SCFMA922111,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) 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:59347 Archived-At: > Sometimes I like to edit files based on a certain criterium. I use for > example a grep command. I use this from a shell in Emacs. (I have to > work with kshell, which does not have tab-expansion. This is why I am > working from a shell in Emacs.) At this moment I am putting those > filenames one by one in the kill-ring and open them. But is there a > better way? > > Offcourse I could do: > emacs `grep ...` & > but this opens an new Emacs session. I would prefer not to open a new > session. Sorry, but I don't understand you. I'm sure someone else does and will give you a good answer. It sounds like you're saying that you have Emacs open, and you use `grep' outside Emacs (or in an Emacs shell buffer), and you then add the names of grepped files that you want to edit to the kill ring, and you then paste those names from the kill ring to, e.g., C-x C-f in order to open the files. Is that right? It's probably not what you mean, but if it is, then my answer would be to use the _Emacs_ command `grep': `M-x grep'. See the Emacs manual, node `Grep Searching'. Unless you have a very special need that doesn't match what Emacs `grep' gives you, you'll appreciate using it, and you'll never go back.