[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Does this qualify as self-replication?



On 990625, Chaim Frenkel wrote:
> (On a seperate note. Obviously that works if it is contained in a
> file. What I don't understand is why using shell-command-on-region
> from emacs it works.  But _not_ when piping the command with an
> echo. If its the fact that one can not seek on a pipe, what is emacs
> doing that makes it work?)

strace on a running xemacs 21.0 beta shows that the input for the external
program is being stored in a file in /tmp and used as the subprocess's stdin,
as if you'd done: 

echo 'seek(DATA,0,0);print <DATA>;__DATA__'>/tmp/foo; perl < /tmp/foo

call-process-region, in process.el, is the function that does this.  There's
no comment explaining why.

==== Want to unsubscribe from Fun With Perl?
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org