From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.help Subject: Re: Gnus: insert signature only when not replying Date: Thu, 16 Nov 2017 19:52:44 +0200 Message-ID: <87k1yq2jrn.fsf@iki.fi> References: <87efoy9q84.fsf@iki.fi> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1510854835 1343 195.159.176.226 (16 Nov 2017 17:53:55 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 16 Nov 2017 17:53:55 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 16 18:53:49 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFOMD-0008F2-8I for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Nov 2017 18:53:45 +0100 Original-Received: from localhost ([::1]:42220 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFOMK-0002Kf-D1 for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Nov 2017 12:53:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFOLM-0002Hd-3P for help-gnu-emacs@gnu.org; Thu, 16 Nov 2017 12:52:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFOLI-0003b5-SG for help-gnu-emacs@gnu.org; Thu, 16 Nov 2017 12:52:52 -0500 Original-Received: from mta-out1.inet.fi ([62.71.2.234]:54584 helo=johanna3.inet.fi) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFOLI-0003aH-GZ for help-gnu-emacs@gnu.org; Thu, 16 Nov 2017 12:52:48 -0500 RazorGate-KAS: Status: not_detected RazorGate-KAS: Rate: 0 RazorGate-KAS: Envelope from: RazorGate-KAS: Version: 5.5.3 RazorGate-KAS: LuaCore: 80 2014-11-10_18-01-23 260f8afb9361da3c7edfd3a8e3a4ca908191ad29 RazorGate-KAS: Lua profiles 69136 [Nov 12 2014] RazorGate-KAS: Method: none Original-Received: from mithlond (109.240.53.245) by johanna3.inet.fi (9.0.002.03-2-gbe5d057) id 5A0D999700061F6E for help-gnu-emacs@gnu.org; Thu, 16 Nov 2017 19:52:47 +0200 In-Reply-To: <87efoy9q84.fsf@iki.fi> (Teemu Likonen's message of "Thu, 16 Nov 2017 17:51:23 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 62.71.2.234 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:114902 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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))))))))))))) =2D-=20 /// Teemu Likonen - .-.. // // PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 /// --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEkhZiiC54Bnj5a16Skzo1BB5+rVEFAloN0GwACgkQkzo1BB5+ rVHLTQgAhPDxGtJoPbL9PFQggINNVDJmyL/df0qONRCBariv/HmhRYbRMNMwCIff +Yuomq1FIwuKxJ5fPse0RtQvcI4rxP+Id1Moo1c0xMg3cXi6qskxGve8vhkAG505 FBQUmQQJF3xW3ZKRUupyN3076f5yofrPgqNqVqlG6A4TNRRHwFwhfiaTmJGvW3eT 45MoCKSdnds6RonxqdR+qnHbRny6QC7sUYlgyQPeUoeg3VV5gCmcw4YWcKjcy2rC bh9oBfXLQIqCw56/8XvQ/Y5PwJMt/2Biw+aXJ3QbIo2rKxN98+EY21IKsAg5Km3y aJhUHd07C9ZTH9PK8hTMaYJsqt4bNw== =ugfK -----END PGP SIGNATURE----- --=-=-=--