emacs-devel
[Top][All Lists]
Advanced

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

Re: process-list in Elisp


From: Leo
Subject: Re: process-list in Elisp
Date: Thu, 03 Mar 2011 10:00:51 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (Mac OS X 10.6.6)

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



reply via email to

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