unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: Le Wang <l26wang@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: async.el: A simple asynchronous framework for Emacs
Date: Fri, 22 Jun 2012 22:07:02 +0200	[thread overview]
Message-ID: <87vcij6rh5.fsf@gnuvola.org> (raw)
In-Reply-To: <CAM=K+ir+vPDd6RhA4a1yivy=4p_qC4vX6m1CVvWrnY1OmCo8QA@mail.gmail.com> (Le Wang's message of "Sat, 23 Jun 2012 00:01:47 +0800")

() Le Wang <l26wang@gmail.com>
() 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	other threads:[~2012-06-22 20:07 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-19  2:51 async.el: A simple asynchronous framework for Emacs John Wiegley
2012-06-19  5:11 ` Thien-Thi Nguyen
2012-06-19  5:36   ` John Wiegley
2012-06-19 13:29 ` Stefan Monnier
2012-06-19 20:44   ` John Wiegley
2012-06-19 21:46     ` Stefan Monnier
2012-06-20  0:20       ` John Wiegley
2012-06-20  0:53         ` John Wiegley
2012-06-20  5:34       ` John Wiegley
2012-06-20  7:24         ` SAKURAI Masashi
2012-06-20  7:52           ` John Wiegley
2012-06-20  8:13             ` John Wiegley
2012-06-20  8:24               ` John Wiegley
2012-06-20  9:32               ` SAKURAI Masashi
2012-06-20 20:36         ` Thien-Thi Nguyen
2012-06-20 23:52           ` John Wiegley
2012-06-21 13:17             ` Thien-Thi Nguyen
2012-06-22 16:01               ` Le Wang
2012-06-22 20:07                 ` Thien-Thi Nguyen [this message]
2012-06-24  9:30                   ` Chong Yidong
2012-06-19 21:38 ` Christopher Allan Webber
2012-06-21  8:31 ` Thierry Volpiatto
     [not found]   ` <m2lijg8ibx.fsf@vulcan.local.i-did-not-set--mail-host-address--so-tickle-me>
     [not found]     ` <87a9zv1fw4.fsf@gmail.com>
     [not found]       ` <m2ehp73t8o.fsf@vulcan.local.i-did-not-set--mail-host-address--so-tickle-me>
     [not found]         ` <871ul63yky.fsf@gmail.com>
     [not found]           ` <m2zk7tzr5e.fsf@vulcan.local.i-did-not-set--mail-host-address--so-tickle-me>
     [not found]             ` <87395lyam9.fsf@gmail.com>
2012-06-26  0:05               ` John Wiegley
2012-06-26  9:41                 ` Thierry Volpiatto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vcij6rh5.fsf@gnuvola.org \
    --to=ttn@gnuvola.org \
    --cc=emacs-devel@gnu.org \
    --cc=l26wang@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).