erc-discuss
[Top][All Lists]
Advanced

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

[Erc-discuss] Re: /list support


From: Michael Olson
Subject: [Erc-discuss] Re: /list support
Date: Thu, 10 Jan 2008 03:06:03 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

Tom Tromey <address@hidden> writes:

> I wrote my own erc-list.el... I know there is one in ERC, but AIUI it
> isn't assigned to the FSF, and I wanted to have one that could go in
> to Emacs proper.  All my paperwork is in place.
>
> It is appended.  Let me know what you think.  I'm new to ERC hacking,
> so I hope I didn't do too much wrong :-)

It looks pretty good.  I've checked it in, with some (documented)
changes.  The old file was renamed to erc-list-old.el, and is still
available as the "list-old" module.

> Two things I didn't know how to do well:
>
> First, the /list output still appears in the server buffer.  How do I
> suppress that?  It seems to be hard-coded in the 321/322 response
> handlers in erc-backend.el.

I've now split the parts of the handler that display the messages into
separate functions, and added them to their response hooks.  Now
erc-list removes those functions when it is enabled, and adds them back
when it is disabled.

If this sort of thing is needed for other responses as well, it might be
nice to have `define-erc-response-handler' do this systematically
somehow.

> Second, I didn't want Emacs to wait for all the /list results -- that
> is pretty unfriendly.  But as it is the list will update while you're
> looking at the buffer, and there is no indication of when it is
> finished.  So, that is kind of weird.  Suggestions?

Yes, asynchronous building of the results is the right way to do it.

As for indications, one minimalistic possibility might be to display

  Building channel list ...

just before popping up the emptied list buffer, and

  Building channel list ... done.

when we receive the 323 response.

-- 
       Michael Olson -- FSF Associate Member #652     |
 http://mwolson.org/ -- Jabber: mwolson_at_hcoop.net  |  /` |\ | | |
          Programmer -- Hobbies: Lisp, HCoop          | |_] | \| |_|
Projects: Emacs, Muse, ERC, EMMS, ErBot, DVC, Planner |

Attachment: pgpk14d6R70x9.pgp
Description: PGP signature


reply via email to

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