[gnu.emacs] Emacs shell-command function

wilensky@aaet.csc.ti.com (Harold Wilensky) (03/20/89)

I am using emacs on a Sun 386i. When I issue the lisp shell-command
function from an emacs lisp program, it usually takes 2 to 3 seconds
before anything happens. This, of course is annoying. Is there another
way to issue a Unix shell command that is faster or a better way to do
this?

--Harold Wilensky
wilensky@aaet.csc.ti.com

gaynor@athos.rutgers.edu (Silver) (03/21/89)

wilensky@aaet.csc.ti.com writes:
> I am using emacs on a Sun 386i.  When I issue the lisp shell-command function
> from an emacs lisp program, it usually takes 2 to 3 seconds before anything
> happens.  This, of course is annoying.  Is there another way to issue a Unix
> shell command that is faster or a better way to do this?

This 2-3 seconds is probably the time necessary to set up a shell.  Yes, it's
very annoying, and fairly common in Unix.  I've seen programs start up shells
for the damdest reasons, rather than starting the desired process directly.  In
GNU Emacs, the trend continues.  You can start a subprocess of emacs yourself
much faster.  Apropos "process" produces a list of pointers to all kind of neat
functions and variables.

Alternatively, you could hack shell-command to start one shell, and use it for
successive shell commands.  This is probably more in keeping with the
ideology of shell-command.

Regards, [Ag] gaynor@rutgers.edu