From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/63592 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: hook to insert sign command and forwarded messages Date: Mon, 28 Aug 2006 09:49:15 +0900 Organization: Emacsen advocacy group Message-ID: References: <87wtajwzjk.fsf@gate450.dyndns.org> <87wta86vzr.fsf@gate450.dyndns.org> <873bbnnciw.fsf@gate450.dyndns.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1156726933 26974 80.91.229.2 (28 Aug 2006 01:02:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Aug 2006 01:02:13 +0000 (UTC) Cc: ding@gnus.org Original-X-From: ding-owner+m12119@lists.math.uh.edu Mon Aug 28 03:02:12 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GHVVx-0006z9-8j for ding-account@gmane.org; Mon, 28 Aug 2006 03:02:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1GHVVg-0002Bd-00; Sun, 27 Aug 2006 20:01:53 -0500 Original-Received: from nas02.math.uh.edu ([129.7.128.40]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1GHVJo-0002BY-00 for ding@lists.math.uh.edu; Sun, 27 Aug 2006 19:49:36 -0500 Original-Received: from quimby.gnus.org ([80.91.227.211]) by nas02.math.uh.edu with esmtp (Exim 4.52) id 1GHVJm-0003nT-2M for ding@lists.math.uh.edu; Sun, 27 Aug 2006 19:49:36 -0500 Original-Received: from washington.hostforweb.net ([66.225.201.13]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1GHVJc-0004lW-00 for ; Mon, 28 Aug 2006 02:49:24 +0200 Original-Received: from [205.234.185.198] (port=54644 helo=mail.jpl.org) by washington.hostforweb.net with esmtpa (Exim 4.52) id 1GHVKv-0001Wp-BF; Sun, 27 Aug 2006 19:50:45 -0500 Original-To: gdt@work.lexort.com X-Hashcash: 1:20:060828:gdt@work.lexort.com::jRuStd5U6lyEBoaN:0000000000000000000000000000000000000000000GzD X-Hashcash: 1:20:060828:ding@gnus.org::vofR56XwnY8E2lRB:00001EuE X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:zDYODMphCqqz+rnTbLd9EABlUtM= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - washington.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -2.5 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:63592 Archived-At: >>>>> In >>>>> 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.