emacs-devel
[Top][All Lists]
Advanced

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

Re: `comint-exec-hook'-like feature for erc?


From: Lawrence Mitchell
Subject: Re: `comint-exec-hook'-like feature for erc?
Date: Fri, 23 Jun 2006 22:33:11 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin)

Michael Olson wrote:

> Joe Corneli <address@hidden> writes:

>> Is there (or should there be) a `comint-exec-hook'-like feature that
>> runs after text has appeared in an ERC buffer (i.e. text that has been
>> put there by anyone)?  I would personally find this useful, and did
>> not see find such a hook in the code.  There is an
>> `erc-send-completed-hook', but this only applies to text that
>> originated locally.

> One of the following hooks will do what you want, depending on whether
> you want the hook to trigger before, after, or during ERC's auxiliary
> text display functions (button highlighting, timestamps, et al).

> erc-insert-modify-hook
>   Variable: Insertion hook for functions that will change the
>   text's appearance.  ...

> erc-insert-post-hook
>   Variable: This hook is called just after
>   `erc-insert-modify-hook'.  ...

> erc-insert-pre-hook
>   Variable: Hook called first when some text is inserted
>   through `erc-display-line'.  ...

Note that these /don't/ get run (as far as I can recall) for text
that we send ourselves, only for text that we receive.  Input
that we send to the server is sent with erc-send-input and
inserted with erc-display-msg (rather than erc-display-line).  As
such, the relevant hooks that are run are
erc-send-{modify,post,pre}-hook.

At some point (many moons ago) I proposed dealing with input we
send in the exact same way (as far as buffer display went) as the
stuff we received from the remote server.  Unfortunately,
roundtoits never appeared at the time, and then I didn't really
think about it again.


Lawrence (still alive, but not really ircing much any more)

-- 
Lawrence Mitchell <address@hidden>





reply via email to

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