Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: proper hook for message body transform?
Date: Fri, 09 Sep 2011 19:35:04 +0800	[thread overview]
Message-ID: <87lity54pj.fsf@ericabrahamsen.net> (raw)

I hope someone can give me a little advice on a project I'm working on.
I'm trying to put tags into a message body that will "do things" to my
org-mode setup -- automatically create TODOs from sent messages, to be
specific. What I'd like to do is have a little text tag that sits in the
message composition buffer, and when the message is sent the tag itself
is stripped from the message, and the good stuff happens in a hook.

I tried looking at the mml package to see how they do it, but can't for
the life of me figure out which hook the mml functions are attached to:
the only hooks I see in the source code are those that are used to kill
the tags if the message is discarded (I think).

Does anyone have any words of wisdom for putting things in message
buffers that are then stripped (and other functions triggered) when the
message is sent? Neither `message-send-hook' nor
`message-send-mail-hook' has anything attached to it by default, which
makes me think there's some better way of doing this. Anyway, any
experience shared would be much appreciated!

Eric




             reply	other threads:[~2011-09-09 11:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-09 11:35 Eric Abrahamsen [this message]
2011-09-09 11:46 ` Leo
2011-09-09 13:07   ` Eric Abrahamsen
2011-09-12  6:56     ` Reiner Steib

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

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

  git send-email \
    --in-reply-to=87lity54pj.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=ding@gnus.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.
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 NNTP newsgroup(s).