unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lawrence Mitchell <wence@gmx.li>
Cc: erc-discuss@gnu.org
Subject: Re: `comint-exec-hook'-like feature for erc?
Date: Fri, 23 Jun 2006 22:33:11 +0100	[thread overview]
Message-ID: <?fnord?m2ac83a76w.fsf@ID-97657.user.individual.net> (raw)
In-Reply-To: 87d5cz68yv.fsf@tuxtanker.mwolson.org

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>

      reply	other threads:[~2006-06-23 21:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='?fnord?m2ac83a76w.fsf@ID-97657.user.individual.net' \
    --to=wence@gmx.li \
    --cc=erc-discuss@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).