From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Adam Funk Newsgroups: gmane.emacs.help Subject: Re: Why can't I use xargs emacs? Date: Wed, 03 Feb 2010 14:18:58 +0000 Organization: $CABAL Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1265208056 4177 80.91.229.12 (3 Feb 2010 14:40:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Feb 2010 14:40: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 Wed Feb 03 15:40:53 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 1NcgPV-0001XS-Mm for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Feb 2010 15:40:53 +0100 Original-Received: from localhost ([127.0.0.1]:35244 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NcgPV-0000pJ-6R for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Feb 2010 09:40:53 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: comp.unix.shell,gnu.emacs.help Original-Followup-To: comp.unix.shell Original-Lines: 32 Original-X-Trace: individual.net zZsEx7OFuvo8JCQZRvi18A+Oa7o8CCvDA1uWUMDrjgd5XuNGP7 X-Orig-Path: news.ducksburg.com!not-for-mail Cancel-Lock: sha1:lKjpLMxkrBJXas+NxNMG9FYTDCQ= sha1:VJXW4jjbne/hXXTdiR3LVb8YUjA= User-Agent: slrn/pre1.0.0-16/mm/ao (Ubuntu Intrepid) Original-Xref: news.stanford.edu comp.unix.shell:233726 gnu.emacs.help:176578 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:71647 Archived-At: On 2010-02-02, Bit Twister wrote: > On Tue, 02 Feb 2010 20:22:17 +0000, Adam Funk wrote: >> The emacs command can take a list of filename arguments, so why can't >> I get xargs to work with it? >> >> $ find -name '*.txt' |xargs emacs -nw >> emacs: standard input is not a tty >> >> $ grep -rl 'foo' some/path |xargs emacs -nw >> emacs: standard input is not a tty > > > Maybe it's the -nw switch. Try > find -name '*.txt' |xargs emacs Yes, it works without -nw, but I'm often logged into an ssh server so it's faster to open emacs in the xterm. Anyway, the solution (posted by Thierry in gnu.emacs.help) turns out to be this: emacs -nw $(find . -name '*.txt') Thanks. -- ...the reason why so many professional artists drink a lot is not necessarily very much to do with the artistic temperament, etc. It is simply that they can afford to, because they can normally take a large part of a day off to deal with the ravages. [Amis _On Drink_]