unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* `comint-exec-hook'-like feature for erc?
@ 2006-06-23 15:32 Joe Corneli
  2006-06-23 18:08 ` Michael Olson
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Corneli @ 2006-06-23 15:32 UTC (permalink / raw)


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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: `comint-exec-hook'-like feature for erc?
  2006-06-23 15:32 `comint-exec-hook'-like feature for erc? Joe Corneli
@ 2006-06-23 18:08 ` Michael Olson
  2006-06-23 21:33   ` Lawrence Mitchell
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Olson @ 2006-06-23 18:08 UTC (permalink / raw)
  Cc: erc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1247 bytes --]

Joe Corneli <jcorneli@planetmath.org> 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'.
  ...

-- 
Michael Olson -- FSF Associate Member #652 -- http://www.mwolson.org/
Interests: Emacs Lisp, text markup, protocols -- Jabber: mwolson_at_hcoop.net
  /` |\ | | | IRC: mwolson on freenode.net: #hcoop, #muse, #PurdueLUG
 |_] | \| |_| Project involvement: Emacs, Muse, Planner, ERC, EMMS

[-- Attachment #1.2: Type: application/pgp-signature, Size: 190 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: `comint-exec-hook'-like feature for erc?
  2006-06-23 18:08 ` Michael Olson
@ 2006-06-23 21:33   ` Lawrence Mitchell
  0 siblings, 0 replies; 3+ messages in thread
From: Lawrence Mitchell @ 2006-06-23 21:33 UTC (permalink / raw)
  Cc: erc-discuss

Michael Olson wrote:

> Joe Corneli <jcorneli@planetmath.org> 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 <wence@gmx.li>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-06-23 21:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-23 15:32 `comint-exec-hook'-like feature for erc? Joe Corneli
2006-06-23 18:08 ` Michael Olson
2006-06-23 21:33   ` Lawrence Mitchell

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).