Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: ding@gnus.org
Subject: Re: hook to insert sign command and forwarded messages
Date: Mon, 28 Aug 2006 09:49:15 +0900	[thread overview]
Message-ID: <b4md5al7khg.fsf@jpl.org> (raw)
In-Reply-To: <smulkpduh4t.fsf_-_@linuxpal.mit.edu>

>>>>> In <smulkpduh4t.fsf_-_@linuxpal.mit.edu>
>>>>>	gdt@work.lexort.com wrote:

> I have the following hook:

>       (add-hook
>        'message-setup-hook
>        (lambda ()
> 	 (message-goto-body)
> 	 (mml-secure-message-sign-pgpmime)))

> This works fine for most things.  But when I forward a message (C-c
> C-f), the <#secure..> line is after the #mml markup around the
> message.  I just added message-goto-body to try to fix this, thinking
> my hook would run after the message was inserted.

> So, I'm not sure what's wrong.  Candidates are:

>  mml-secure-message-sign-pgpmime should insert at beginning (seems
>  like it does, and message-goto-body ensures that)

Yes, it does.  However, now the `message-forward' function inserts
a forwarded part after `message-setup-hook' is run.

>  insertion of forwarded message should be after any secure tags

We can do it.

>  hook should be run after the insertion

We can do it.  How about this?

(defadvice message-forward (around run-message-setup-hook-last activate)
  "Run `message-setup-hook' last."
  (let ((message-setup-hook nil))
    ad-do-it)
  (run-hooks 'message-setup-hook))

Although we can change the `message-forward' function so as to
work like this, I'm not sure it never causes any harm to all
users.



      reply	other threads:[~2006-08-28  0:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-11 22:24 backporting bugfixes to the v5-10 branch Andreas Seltenreich
2006-07-17 17:52 ` Reiner Steib
2006-07-20 17:12   ` Andreas Seltenreich
2006-08-22  7:24     ` Andreas Seltenreich
2006-08-22 13:59       ` Reiner Steib
2006-08-23  4:20         ` Andreas Seltenreich
2006-08-23  7:20     ` The Agent vs. gnus-find-method-for-group (was: backporting bugfixes to the v5-10 branch) Andreas Seltenreich
2006-08-25 12:36       ` hook to insert sign command and forwarded messages gdt
2006-08-28  0:49         ` Katsumi Yamaoka [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

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

  git send-email \
    --in-reply-to=b4md5al7khg.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --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).