From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.devel Subject: Re: process-list in Elisp Date: Thu, 03 Mar 2011 10:00:51 +0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1299117682 14525 80.91.229.12 (3 Mar 2011 02:01:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 3 Mar 2011 02:01:22 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 03 03:01:18 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Puxqv-0007vb-Pi for ged-emacs-devel@m.gmane.org; Thu, 03 Mar 2011 03:01:18 +0100 Original-Received: from localhost ([127.0.0.1]:42223 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Puxqv-0006DX-0D for ged-emacs-devel@m.gmane.org; Wed, 02 Mar 2011 21:01:17 -0500 Original-Received: from [140.186.70.92] (port=34725 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Puxqq-0006DG-Ku for emacs-devel@gnu.org; Wed, 02 Mar 2011 21:01:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Puxqp-0004U4-P0 for emacs-devel@gnu.org; Wed, 02 Mar 2011 21:01:12 -0500 Original-Received: from mail-iy0-f169.google.com ([209.85.210.169]:61928) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Puxqp-0004Ts-Ll for emacs-devel@gnu.org; Wed, 02 Mar 2011 21:01:11 -0500 Original-Received: by iyf13 with SMTP id 13so673851iyf.0 for ; Wed, 02 Mar 2011 18:01:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=P4PbyncgLrQXXGLUqYgiVppgGgujDEP7EWi+l1xobVY=; b=QDvRYbf2vTxQq0u6DYAF3AlrBo5ew82TjyMwtJKTmcNyrGjPxbyM9fNrSx6SwKFCwJ W+Z4oYxynrKmdTJy5yS7twm60T6w30fj2zHQUOm0/gbOmWRU3Oq8bYPvz88slfIbd2e2 RYWp8bjuNgVrQd5PaX2Rf9Cl6E3bivRcH9yls= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=GvCIDE+kYm8L4zCtaBqptjeuRJMqWRktiwWx/fuSRSYGyrQs+o7QoJvP5V5MvalFLj dPiDj6CCiEi0WZ2sili+9POhQkjPCkD6Me/dH/mMIHFFiwRCGobzBbQZUyqn6DPtH8Zj DXI+A/0odp5z+bVrEhdmoYSuvOjtrCQsswN+U= Original-Received: by 10.42.115.69 with SMTP id j5mr760531icq.286.1299117670285; Wed, 02 Mar 2011 18:01:10 -0800 (PST) Original-Received: from Victoria.local ([117.28.22.139]) by mx.google.com with ESMTPS id y8sm346198ica.14.2011.03.02.18.01.00 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Mar 2011 18:01:08 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Sat, 26 Feb 2011 16:12:09 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (Mac OS X 10.6.6) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:136735 Archived-At: Hi Stefan, Sorry for the delay in reply. On 2011-02-27 05:12 +0800, Stefan Monnier wrote: >> 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. > > In order to limit the complaints, I'd like to make sure the "more or > less" is closer to more than to less. One thing that is immediately > obvious is that the original code uses with-output-to-temp-buffer > whereas you use something else, so your code doesn't obey the various > hooks run by with-output-to-temp-buffer. Was there a particular reason > for this change? It was probably because I original put the new buffer in its own major mode so I didn't use with-output-to-temp-buffer. I think a bit more about this. I think eventually it will be good to have its own major mode to have a few more key bindings. For example, I would like being able to mark process for deletion with 'd' and 'x', or 'D' just like in Dired. And 'RET' to visit a process buffer and maybe 'TAB' to move from column to column. Do you want me to change to with-output-to-temp-buffer? > Do you know of other similar changes to the behavior? Have you > followed the C source code when writing the new code, or have you > simply tried to reproduce the behavior you saw? I would say it is pretty close. I implemented the elisp version without looking at the C source, and tested it with processes created by make-network-process, make-serial-process and start-process and make sure the output is similar to the C version. So this was done in Nov 2010 and I have been using it and haven't found any unusual things. But I didn't follow the C version literally. Just before I sent out the last email I did look at the C source again and felt happy with the elisp version. It would be good for someone else to compare the elisp and C versions. BTW, I think list-processes is probably a third-class user command. > Stefan Leo