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

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

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


From: Christian Kruse
Subject: Gnus: set the signing marker to the top of the new message
Date: Wed, 27 Jan 2016 08:56:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Hi folks,

I try to switch from notmuch mail to Gnus (since the notmuch setup is
too komplex; keeping the tags synchronized across three devices is very
hard). In notmuch I wrote this little snippet to always sign messages
with GnuPG:

(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.

But since Gnus yanks the text after the message-setup-hook gets executed
I now end up with the signing marker after the message.

Is there a hook that gets executed after the yanking? I could not find
one, but maybe I’ve been overseeing it? If not: is there a different
solution for this problem?

I’d like to have the marker directly below the `--text follows this
line--` marker and the quoted text below.

Best regards,
-- 
Christian Kruse
https://wwwtech.de/about

Attachment: signature.asc
Description: PGP signature


reply via email to

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