all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leo <sdl.web@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: process-list in Elisp
Date: Tue, 22 Feb 2011 15:11:43 +0800	[thread overview]
Message-ID: <m1ipwcmtlc.fsf@gmail.com> (raw)
In-Reply-To: jwv62sdysb6.fsf-monnier+emacs@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1178 bytes --]

On 2011-02-22 05:48 +0800, Stefan Monnier wrote:
> It looks like this died down. Could the two authors of the two
> competing implementations comment on their opinion on the best way to
> replace the current C code with Elisp code?
>
> It would be good if it could be installed first as a "replace the C
> code with functionally equivalent code" and then a bunch of patches
> adding new features (e.g. addressing bug#8087).

I think first we need to find a way to clean up signalled/exited/closed
processes in the elisp version of list-processes in order to keep its
documented behaviour.

Any objection to using this:

(mapc (lambda (p)
        (when (memq (process-status p) '(exit signal closed))
          (delete-process p)))
      (process-list))

This re-use delete-process instead of another primitive.

,----[ (info "(elisp)Deleting Processes") ]
| If you delete a terminated process explicitly before it is
| deleted automatically, no harm results.
`----

I attach an implementation of list-processes in elisp that's more or
less equivalent to the primitive list-processes except it no longer pops
up an empty buffer when the process list is empty.

Best wishes,
Leo


[-- Attachment #2: emacs-process.el --]
[-- Type: application/emacs-lisp, Size: 5924 bytes --]

  reply	other threads:[~2011-02-22  7:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-21 21:48 process-list in Elisp Stefan Monnier
2011-02-22  7:11 ` Leo [this message]
2011-02-22 18:10   ` Stefan Monnier
2011-02-26 21:12   ` Stefan Monnier
2011-03-03  2:00     ` Leo

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

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

  git send-email \
    --in-reply-to=m1ipwcmtlc.fsf@gmail.com \
    --to=sdl.web@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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 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.