[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gnus: insert signature only when not replying
From: |
Teemu Likonen |
Subject: |
Re: Gnus: insert signature only when not replying |
Date: |
Thu, 16 Nov 2017 19:52:44 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) |
Teemu Likonen [2017-11-16 17:51:23+02] wrote:
> In certain Gnus's groups I'd like to have an automatic message
> signature only when composing a new message but not in replies.
I got it working. It's a bit ugly but here it is:
(setq gnus-parameters
'(("\\`nnimap\\+foo:"
(posting-style
(eval (setq-local message-signature
(lambda ()
(unless message-reply-headers
(let ((sig "~/.signature"))
(when (file-exists-p sig)
(with-temp-buffer
(insert-file-contents sig)
(buffer-substring-no-properties
(point-min) (point-max)))))))))))))
--
/// Teemu Likonen - .-.. <https://keybase.io/tlikonen> //
// PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///
signature.asc
Description: PGP signature