🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #4099

Re: Why can't I use xargs emacs?

#4099
From: Adam Funk
Date: Wed, 03 Feb 2010 14:18
32 lines
1904 bytes
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_]
Technical Details
Message-ID: <i7do37xj19.ln2@news.ducksburg.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
References: <p4em37xiau.ln2@news.ducksburg.com> <slrnhmh5di.8hb.BitTwister@wb.home.test>

Show Full Headers
Complete Article Headers
X-Google-Thread: 39ae015015,546aec423372e37b
X-Google-Attributes: gid39ae015015,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Adam Funk <a24061@ducksburg.com>
Newsgroups: comp.unix.shell,gnu.emacs.help
Subject: Re: Why can't I use xargs emacs?
Followup-To: comp.unix.shell
Date: Wed, 03 Feb 2010 14:18:58 +0000
Organization: $CABAL
Lines: 32
Message-ID: <i7do37xj19.ln2@news.ducksburg.com>
References: <p4em37xiau.ln2@news.ducksburg.com>
 <slrnhmh5di.8hb.BitTwister@wb.home.test>
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)