emacs-devel
[Top][All Lists]
Advanced

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

Re: async.el: A simple asynchronous framework for Emacs


From: Thien-Thi Nguyen
Subject: Re: async.el: A simple asynchronous framework for Emacs
Date: Fri, 22 Jun 2012 22:07:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

() Le Wang <address@hidden>
() Sat, 23 Jun 2012 00:01:47 +0800

   This is off-topic, but what a wonderful tip!

I see in (info "(elisp) Asynchronous Processes")
the introductory blurb:

   Here we describe how to create an asynchronous process.

and then, below, for ‘process-connection-type’, the paragraph:

     PTYs are usually preferable for processes visible to the
     user, as in Shell mode, because they allow job control
     (`C-c', `C-z', etc.) to work between the process and its
     children, whereas pipes do not.  For subprocesses used for
     internal purposes by programs, it is often better to use a
     pipe, because they are more efficient.  In addition, the
     total number of PTYs is limited on many systems and it is
     good not to waste them.

Probably this could be moved into the intro blurb to aid its
discovery, and furthermore modified to mention correctness as well
(and not only efficiency) for large (for a PTY) messages.  Another
idea is to move the (one) variable doc before the function docs,
but that would be a jolt in the style.  For example:

   Here we describe how to create an asynchronous process,
   including a variable that controls whether PTYs or pipes should
   be used at the time of the actual subprocess creation.

   PTYs are usually preferable for processes visible to the user,
   as in Shell mode, because they allow job control (`C-c', `C-z',
   etc.) to work between the process and its children, whereas
   pipes do not.  For subprocesses used for internal purposes by
   programs, it is often better to use a pipe, because they are
   more efficient, and immune to stray character injections that
   PTYs use for large (ca. 500 byte) messages.  In addition, the
   total number of PTYs is limited on many systems and it is good
   not to waste them.

Not so svelte (needs work), but maybe Someone will be inspired...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]