all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Why can't I use xargs emacs?
@ 2010-02-02 20:22 Adam Funk
  2010-02-02 21:14 ` Bit Twister
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Adam Funk @ 2010-02-02 20:22 UTC (permalink / raw)
  To: help-gnu-emacs

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


-- 
Steve: Now, okay.  I did say that monkeys could program Visual Basic.
Leo:   But not that all Visual Basic programmers are monkeys.
Steve: Exactly.                                    [Security Now 194]


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Why can't I use xargs emacs?
  2010-02-02 20:22 Why can't I use xargs emacs? Adam Funk
@ 2010-02-02 21:14 ` Bit Twister
  2010-02-03 11:14   ` Andreas Röhler
  2010-02-03 14:18   ` Adam Funk
  2010-02-02 21:35 ` Bill Marcum
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 19+ messages in thread
From: Bit Twister @ 2010-02-02 21:14 UTC (permalink / raw)
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Why can't I use xargs emacs?
  2010-02-02 20:22 Why can't I use xargs emacs? Adam Funk
  2010-02-02 21:14 ` Bit Twister
@ 2010-02-02 21:35 ` Bill Marcum
  2010-02-03  7:23   ` Thierry Volpiatto
       [not found]   ` <mailman.634.1265182143.14305.help-gnu-emacs@gnu.org>
  2010-02-02 22:40 ` Pascal J. Bourguignon
                   ` (3 subsequent siblings)
  5 siblings, 2 replies; 19+ messages in thread
From: Bill Marcum @ 2010-02-02 21:35 UTC (permalink / raw)
  To: help-gnu-emacs

["Followup-To:" header set to comp.unix.shell.]
On 2010-02-02, Adam Funk <a24061@ducksburg.com> 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
>
It says: standard input is not a tty. I don't normally use emacs, so there
may be a better way to do this, but you could write a function:
my_emacs () { emacs "$@" </dev/tty >&0 2>&0 ; }



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Why can't I use xargs emacs?
  2010-02-02 20:22 Why can't I use xargs emacs? Adam Funk
  2010-02-02 21:14 ` Bit Twister
  2010-02-02 21:35 ` Bill Marcum
@ 2010-02-02 22:40 ` Pascal J. Bourguignon
  2010-02-03  3:40   ` Ivan Shmakov
  2010-02-02 22:56 ` Pascal J. Bourguignon
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 19+ messages in thread
From: Pascal J. Bourguignon @ 2010-02-02 22:40 UTC (permalink / raw)
  To: help-gnu-emacs

Adam Funk <a24061@ducksburg.com> writes:

> 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

emacs is an interactive program.  It expects its stdin and stdout to
be hooked to the terminal, where it can display a character matrix,
and from which it can read user input.

When you use a pipe to send paths to xargs, you disconnect the
terminal from the stdin, and replace it with a pipe.  When xargs forks
and exec emacs, emacs inherit this pipe as stdin, and cannot get user
input, but will get instead further path from grep.

% echo hello > file ; ( echo -b ; echo file ) | xargs -L 1 cat 
hello


To open several files in emacs, you could either use emacsclient, or
an emacs lisp script.

Launch emacs in a separate terminal: xterm -e emacs -nw & 
In emacs, start the server:          M-x server-start RET
In a shell, you can then type:       find -name '*.txt' | xargs emacsclient -n



Simplier would be to just open the file in emacs:

Launch emacs:  emacs -nw 
Then type: C-x C-f *.txt RET


For the second case, you could type:
M-: (map nil 'find-file (split-string (shell-command-to-string "grep -rl 'foo' some/path") "\n")) RET


-- 
__Pascal Bourguignon__


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Why can't I use xargs emacs?
  2010-02-02 20:22 Why can't I use xargs emacs? Adam Funk
                   ` (2 preceding siblings ...)
  2010-02-02 22:40 ` Pascal J. Bourguignon
@ 2010-02-02 22:56 ` Pascal J. Bourguignon
  2010-02-02 23:51 ` Harald Hanche-Olsen
  2010-02-03 14:12 ` hymie!
  5 siblings, 0 replies; 19+ messages in thread
From: Pascal J. Bourguignon @ 2010-02-02 22:56 UTC (permalink / raw)
  To: help-gnu-emacs

Adam Funk <a24061@ducksburg.com> writes:

> 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

emacs is an interactive program.  It expects its stdin and stdout to
be hooked to the terminal, where it can display a character matrix,
and from which it can read user input.

When you use a pipe to send paths to xargs, you disconnect the
terminal from the stdin, and replace it with a pipe.  When xargs forks
and exec emacs, emacs inherit this pipe as stdin, and cannot get user
input, but will get instead further path from grep.

% echo hello > file ; ( echo -b ; echo file ) | xargs -L 1 cat 
hello


To open several files in emacs, you could either use emacsclient, or
an emacs lisp script.

Launch emacs in a separate terminal: xterm -e emacs -nw & 
In emacs, start the server:          M-x server-start RET
In a shell, you can then type:       find -name '*.txt' | xargs emacsclient -n



Simplier would be to just open the file in emacs:

Launch emacs:  emacs -nw 
Then type: C-x C-f *.txt RET


For the second case, you could type:
M-: (map nil 'find-file (split-string (shell-command-to-string "grep -rl 'foo' some/path") "\n")) RET


-- 
__Pascal Bourguignon__


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Why can't I use xargs emacs?
  2010-02-02 20:22 Why can't I use xargs emacs? Adam Funk
                   ` (3 preceding siblings ...)
  2010-02-02 22:56 ` Pascal J. Bourguignon
@ 2010-02-02 23:51 ` Harald Hanche-Olsen
  2010-02-03 14:12 ` hymie!
  5 siblings, 0 replies; 19+ messages in thread
From: Harald Hanche-Olsen @ 2010-02-02 23:51 UTC (permalink / raw)
  To: help-gnu-emacs

+ Adam Funk <a24061@ducksburg.com>:

> 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

$ find -name '*.txt' |xargs sh -c 'emacs -nw "$@" </dev/tty' -

(untested)

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
  when there is no ground whatsoever for supposing it is true.
  -- Bertrand Russell


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Why can't I use xargs emacs?
  2010-02-02 22:40 ` Pascal J. Bourguignon
@ 2010-02-03  3:40   ` Ivan Shmakov
  0 siblings, 0 replies; 19+ messages in thread
From: Ivan Shmakov @ 2010-02-03  3:40 UTC (permalink / raw)
  To: help-gnu-emacs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "PJB" == Pascal J Bourguignon <pjb@informatimago.com> writes:
>>>>> "AF" == Adam Funk <a24061@ducksburg.com> writes:

 AF> The emacs command can take a list of filename arguments, so why
 AF> can't I get xargs to work with it?

 > $ find -name '*.txt' |xargs emacs -nw
 > emacs: standard input is not a tty

[...]

 PJB> emacs is an interactive program.  It expects its stdin and stdout
 PJB> to be hooked to the terminal, where it can display a character
 PJB> matrix, and from which it can read user input.

[...]

 PJB> To open several files in emacs, you could either use emacsclient,
 PJB> or an emacs lisp script.

 PJB> Launch emacs in a separate terminal: xterm -e emacs -nw &

 PJB> In emacs, start the server: M-x server-start RET

 PJB> In a shell, you can then type: find -name '*.txt' | xargs
 PJB> emacsclient -n

	Note that a separate terminal is not necessary, as one can call
	Shell commands from Emacs, like:

$ emacs -nw 
...
M-x server-start RET
...
M-! find -name '*.txt' | xargs emacsclient -n & RET

	But one has to use an “asynchronous” (i. e., “background”)
	command, as indicated by an ampersand after the command line.

 PJB> Simplier would be to just open the file in emacs:

 PJB> Launch emacs: emacs -nw Then type: C-x C-f *.txt RET

	Though that will not recurse into the directories, as the plain
	find will.

[...]

- -- 
FSF associate member #7257
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkto8B8ACgkQMBO2oCMOM0oHhACgrkJftA4oYTWHscebcCtUvVj2
YroAn2Yg0f8GXeGQoeYzKQcm90waYytw
=hJo3
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Why can't I use xargs emacs?
  2010-02-02 21:35 ` Bill Marcum
@ 2010-02-03  7:23   ` Thierry Volpiatto
       [not found]   ` <mailman.634.1265182143.14305.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 19+ messages in thread
From: Thierry Volpiatto @ 2010-02-03  7:23 UTC (permalink / raw)
  To: help-gnu-emacs

Why not a simple:

emacs -nw -Q $(find . -name '*.txt')

Why do you want to use xargs?

Bill Marcum <marcumbill@bellsouth.net> writes:

> ["Followup-To:" header set to comp.unix.shell.]
> On 2010-02-02, Adam Funk <a24061@ducksburg.com> 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
>>
> It says: standard input is not a tty. I don't normally use emacs, so there
> may be a better way to do this, but you could write a function:
> my_emacs () { emacs "$@" </dev/tty >&0 2>&0 ; }
>
>

-- 
Thierry Volpiatto





^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Why can't I use xargs emacs?
  2010-02-02 21:14 ` Bit Twister
@ 2010-02-03 11:14   ` Andreas Röhler
  2010-02-03 14:18   ` Adam Funk
  1 sibling, 0 replies; 19+ messages in thread
From: Andreas Röhler @ 2010-02-03 11:14 UTC (permalink / raw)
  To: Bit Twister; +Cc: help-gnu-emacs

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
> 

Works for me, thanks.

Andreas

--
https://code.launchpad.net/~a-roehler/python-mode
https://code.launchpad.net/s-x-emacs-werkstatt/





^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Why can't I use xargs emacs?
  2010-02-02 20:22 Why can't I use xargs emacs? Adam Funk
                   ` (4 preceding siblings ...)
  2010-02-02 23:51 ` Harald Hanche-Olsen
@ 2010-02-03 14:12 ` hymie!
  2010-02-03 14:20   ` Adam Funk
  2010-02-11  3:19   ` David Combs
  5 siblings, 2 replies; 19+ messages in thread
From: hymie! @ 2010-02-03 14:12 UTC (permalink / raw)
  To: help-gnu-emacs

In our last episode, the evil Dr. Lacto had captured our hero,
  Adam Funk <a24061@ducksburg.com>, who said:
>
>
>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

Are you missing the . in your find command on purpose?

What's wrong with
emacs -nw `find  . -name '*.txt'`
?

--hymie!    http://lactose.homelinux.net/~hymie    hymie@lactose.homelinux.net
-------------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Why can't I use xargs emacs?
  2010-02-02 21:14 ` Bit Twister
  2010-02-03 11:14   ` Andreas Röhler
@ 2010-02-03 14:18   ` Adam Funk
  1 sibling, 0 replies; 19+ messages in thread
From: Adam Funk @ 2010-02-03 14:18 UTC (permalink / raw)
  To: help-gnu-emacs

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_]


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Why can't I use xargs emacs?
  2010-02-03 14:12 ` hymie!
@ 2010-02-03 14:20   ` Adam Funk
  2010-02-03 16:19     ` Thierry Volpiatto
       [not found]     ` <mailman.645.1265214302.14305.help-gnu-emacs@gnu.org>
  2010-02-11  3:19   ` David Combs
  1 sibling, 2 replies; 19+ messages in thread
From: Adam Funk @ 2010-02-03 14:20 UTC (permalink / raw)
  To: help-gnu-emacs

On 2010-02-03, hymie! wrote:

> In our last episode, the evil Dr. Lacto had captured our hero,
>   Adam Funk <a24061@ducksburg.com>, who said:

>>$ find -name '*.txt' |xargs emacs -nw
>>emacs: standard input is not a tty
>
> Are you missing the . in your find command on purpose?

It's optional in GNU find.


> What's wrong with
> emacs -nw `find  . -name '*.txt'`
> ?

Nothing, thanks!  What's the difference between these two?

emacs -nw `find  . -name '*.txt'`
emacs -nw $(find  . -name '*.txt')


-- 
Usenet is a cesspool, a dung heap.  [Patrick A. Townson]


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Why can't I use xargs emacs?
       [not found]   ` <mailman.634.1265182143.14305.help-gnu-emacs@gnu.org>
@ 2010-02-03 14:21     ` Adam Funk
  2010-02-06  7:45       ` Jorgen Grahn
  0 siblings, 1 reply; 19+ messages in thread
From: Adam Funk @ 2010-02-03 14:21 UTC (permalink / raw)
  To: help-gnu-emacs

On 2010-02-03, Thierry Volpiatto wrote:

> Why not a simple:
>
> emacs -nw -Q $(find . -name '*.txt')

That works, thanks.  I'd forgotten about the $(...) construction.


> Why do you want to use xargs?

Because that's what I always do (except for this, now) when I want to
find or grep -l some files and fire a command at them all.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Why can't I use xargs emacs?
  2010-02-03 14:20   ` Adam Funk
@ 2010-02-03 16:19     ` Thierry Volpiatto
       [not found]     ` <mailman.645.1265214302.14305.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 19+ messages in thread
From: Thierry Volpiatto @ 2010-02-03 16:19 UTC (permalink / raw)
  To: help-gnu-emacs

Adam Funk <a24061@ducksburg.com> writes:

> On 2010-02-03, hymie! wrote:
>
>> In our last episode, the evil Dr. Lacto had captured our hero,
>>   Adam Funk <a24061@ducksburg.com>, who said:
>
>>>$ find -name '*.txt' |xargs emacs -nw
>>>emacs: standard input is not a tty
>>
>> Are you missing the . in your find command on purpose?
>
> It's optional in GNU find.
>
>
>> What's wrong with
>> emacs -nw `find  . -name '*.txt'`
>> ?
>
> Nothing, thanks!  What's the difference between these two?
>
> emacs -nw `find  . -name '*.txt'`
> emacs -nw $(find  . -name '*.txt')
Nothing that's the same, i prefer $() than backquote but that just a
choice.

Though bash was speaking at one time to remove backquote construction or
make it obsoléte in future versions.

Don't know what they did finally.
-- 
Thierry Volpiatto





^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Why can't I use xargs emacs?
       [not found]     ` <mailman.645.1265214302.14305.help-gnu-emacs@gnu.org>
@ 2010-02-03 21:15       ` Adam Funk
  2010-02-04 12:08         ` Andreas Röhler
  0 siblings, 1 reply; 19+ messages in thread
From: Adam Funk @ 2010-02-03 21:15 UTC (permalink / raw)
  To: help-gnu-emacs

On 2010-02-03, Thierry Volpiatto wrote:

> Adam Funk <a24061@ducksburg.com> writes:

>> Nothing, thanks!  What's the difference between these two?
>>
>> emacs -nw `find  . -name '*.txt'`
>> emacs -nw $(find  . -name '*.txt')
> Nothing that's the same, i prefer $() than backquote but that just a
> choice.
>
> Though bash was speaking at one time to remove backquote construction or
> make it obsoléte in future versions.
>
> Don't know what they did finally.

Well, I know backquotes still work because I use them in bash scripts
a lot.  As pointed out elsewhere in the thread, however, $(...) is a
lot easier to nest.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Why can't I use xargs emacs?
  2010-02-03 21:15       ` Adam Funk
@ 2010-02-04 12:08         ` Andreas Röhler
  0 siblings, 0 replies; 19+ messages in thread
From: Andreas Röhler @ 2010-02-04 12:08 UTC (permalink / raw)
  To: help-gnu-emacs

Adam Funk wrote:
> On 2010-02-03, Thierry Volpiatto wrote:
> 
>> Adam Funk <a24061@ducksburg.com> writes:
> 
>>> Nothing, thanks!  What's the difference between these two?
>>>
>>> emacs -nw `find  . -name '*.txt'`
>>> emacs -nw $(find  . -name '*.txt')
>> Nothing that's the same, i prefer $() than backquote but that just a
>> choice.
>>
>> Though bash was speaking at one time to remove backquote construction or
>> make it obsoléte in future versions.
>>
>> Don't know what they did finally.
> 
> Well, I know backquotes still work because I use them in bash scripts
> a lot.  As pointed out elsewhere in the thread, however, $(...) is a
> lot easier to nest.
> 

Here is, what man bash says:

     When the  old-style backquote form of  substitution is used,
     backslash retains  its literal meaning  except when followed
     by  $, `,  or  \.  The  first  backquote not  preceded by  a
     backslash terminates  the command substitution.   When using
     the $(command) form,  all characters between the parentheses
     make up the command; none are treated specially.

     Command substitutions may be nested.  To nest when using the
     backquoted   form,   escape   the  inner   backquotes   with
     backslashes.






^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Why can't I use xargs emacs?
  2010-02-03 14:21     ` Adam Funk
@ 2010-02-06  7:45       ` Jorgen Grahn
  2010-02-06 19:37         ` Adam Funk
  0 siblings, 1 reply; 19+ messages in thread
From: Jorgen Grahn @ 2010-02-06  7:45 UTC (permalink / raw)
  To: help-gnu-emacs

On Wed, 2010-02-03, Adam Funk wrote:
> On 2010-02-03, Thierry Volpiatto wrote:
>
>> Why not a simple:
>>
>> emacs -nw -Q $(find . -name '*.txt')
>
> That works, thanks.  I'd forgotten about the $(...) construction.

In the most popular shells, yes. You'd have to use backticks in tcsh.

>> Why do you want to use xargs?
>
> Because that's what I always do (except for this, now) when I want to
> find or grep -l some files and fire a command at them all.

"Fire command at many files" isn't exactly what xargs does.

It's really for filtering. 'xargs foo' may choose to execute foo many
times (an infinite number of times if its own input is infinite) since
all that matters is "I want on stdout the results of applying foo to
all those files, in sequence".

/Jorgen

-- 
  // Jorgen Grahn <grahn@  Oo  o.   .  .
\X/     snipabacken.se>   O  o   .


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Why can't I use xargs emacs?
  2010-02-06  7:45       ` Jorgen Grahn
@ 2010-02-06 19:37         ` Adam Funk
  0 siblings, 0 replies; 19+ messages in thread
From: Adam Funk @ 2010-02-06 19:37 UTC (permalink / raw)
  To: help-gnu-emacs

On 2010-02-06, Jorgen Grahn wrote:

> On Wed, 2010-02-03, Adam Funk wrote:
>> On 2010-02-03, Thierry Volpiatto wrote:

>>> Why do you want to use xargs?
>>
>> Because that's what I always do (except for this, now) when I want to
>> find or grep -l some files and fire a command at them all.
>
> "Fire command at many files" isn't exactly what xargs does.
>
> It's really for filtering. 'xargs foo' may choose to execute foo many
> times (an infinite number of times if its own input is infinite) since
> all that matters is "I want on stdout the results of applying foo to
> all those files, in sequence".

Oops, I had misunderstood the operation of xargs, which I've now
reviewed.  Thanks.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Why can't I use xargs emacs?
  2010-02-03 14:12 ` hymie!
  2010-02-03 14:20   ` Adam Funk
@ 2010-02-11  3:19   ` David Combs
  1 sibling, 0 replies; 19+ messages in thread
From: David Combs @ 2010-02-11  3:19 UTC (permalink / raw)
  To: help-gnu-emacs

In article <Vufan.39557$BV.3195@newsfe07.iad>,
hymie! <hymie@lactose.homelinux.net> wrote:
>In our last episode, the evil Dr. Lacto had captured our hero,
>  Adam Funk <a24061@ducksburg.com>, who said:
>>
>>
>>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
>
>Are you missing the . in your find command on purpose?
>
>What's wrong with
>emacs -nw `find  . -name '*.txt'`
>?
>
>--hymie!    http://lactose.homelinux.net/~hymie    hymie@lactose.homelinux.net
>-------------------------------------------------------------------------------

Am puzzled.

Before the above answer, you're running emacs once per file.

I'd imagine it takes FAR more time to get an emacs run going
that whatever you're going to do to that single file once
emacs is running.

My question: exactly what are you doing to or with that
file inside emacs?

Whatever that is, will you be doing it via your own fingers --
you know, editing, etc.

Or will emacs automatically run some (emacs) script on it --
the same script on each file ie on each emacs-run?

Unless emacs is doing something that only emacs can do
that eg vim etc cannot do, seems to me that you're using
a sledgehammer -- nay, a piledriver -- to kill an ant.

I don't know about what others do, but when I run emacs,
I typically run it ONCE, and then "live" inside it for
an hour, a day, or more likely for several days, until
I take down the computer.

So, please, just what are you doing WITHIN emacs -- ie,
once it's read in one of those many files you're dealing with?

Thanks!

David


-----

FYI: If you want to run emacs on windows, run "NTemacs" (google
it); in my experience, it works VASTLY better than the regular
emacs compiled for windows.

In fact, with ntemacs, I can't tell the difference between when
I'm using it on windows (xp) or solaris (sparc).

Oh, the "nt" prefix.  My guess is that windows was so
crappy until finally MS came out with NT, so they named
emacs for that NTemacs, and the name remained for 2k, xp, etc.


David




^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2010-02-11  3:19 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-02 20:22 Why can't I use xargs emacs? Adam Funk
2010-02-02 21:14 ` Bit Twister
2010-02-03 11:14   ` Andreas Röhler
2010-02-03 14:18   ` Adam Funk
2010-02-02 21:35 ` Bill Marcum
2010-02-03  7:23   ` Thierry Volpiatto
     [not found]   ` <mailman.634.1265182143.14305.help-gnu-emacs@gnu.org>
2010-02-03 14:21     ` Adam Funk
2010-02-06  7:45       ` Jorgen Grahn
2010-02-06 19:37         ` Adam Funk
2010-02-02 22:40 ` Pascal J. Bourguignon
2010-02-03  3:40   ` Ivan Shmakov
2010-02-02 22:56 ` Pascal J. Bourguignon
2010-02-02 23:51 ` Harald Hanche-Olsen
2010-02-03 14:12 ` hymie!
2010-02-03 14:20   ` Adam Funk
2010-02-03 16:19     ` Thierry Volpiatto
     [not found]     ` <mailman.645.1265214302.14305.help-gnu-emacs@gnu.org>
2010-02-03 21:15       ` Adam Funk
2010-02-04 12:08         ` Andreas Röhler
2010-02-11  3:19   ` David Combs

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.