help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gnus: set the signing marker to the top of the new message


From: Teemu Likonen
Subject: Re: Gnus: set the signing marker to the top of the new message
Date: Wed, 27 Jan 2016 15:03:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5.50 (gnu/linux)

Christian Kruse [2016-01-27 08:56:31+01] wrote:

> (defun ck/sign-message ()
>   (interactive)
>   (goto-char (point-min))
>   (search-forward "--text follows this line--")
>   (end-of-line)
>   (insert "\n")
>
>   (mml-secure-message-sign-pgpmime))
>
> (add-hook 'message-setup-hook 'ck/sign-message)
>
> This ensures that the signing marker is always the first thing in the
> new message.

Just this does the right thing here:

    (add-hook 'gnus-message-setup-hook #'mml-secure-message-sign)

The difference is that i use gnus-...-hook, not message-...-hook. I also
have mml-secure-message-sign which, by default, uses PGP MIME method so
it's effectively the same as yours.

-- 
/// Teemu Likonen   - .-..   <https://github.com/tlikonen> //
// PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]