From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id V3F6A2g9tF9vUQAA0tVLHw (envelope-from ) for ; Tue, 17 Nov 2020 21:15:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 6O1xOmc9tF8MWAAAB5/wlQ (envelope-from ) for ; Tue, 17 Nov 2020 21:15:19 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 59D8B9403A9 for ; Tue, 17 Nov 2020 21:15:17 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 000DA28C4D; Tue, 17 Nov 2020 16:15:09 -0500 (EST) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 9C3761FFD7 for ; Tue, 17 Nov 2020 16:15:06 -0500 (EST) Received: by fethera.tethera.net (Postfix, from userid 1001) id 521BA5FB8B; Tue, 17 Nov 2020 15:54:49 -0500 (EST) Received: (nullmailer pid 1796857 invoked by uid 1000); Tue, 17 Nov 2020 20:54:47 -0000 From: David Bremner To: "Jorge P. de Morais Neto" , notmuch@notmuchmail.org Subject: Re: Programmatically set "From", Ispell dictionary and signature based on recipient In-Reply-To: <87h7pnpydr.fsf@disroot.org> References: <87h7pnpydr.fsf@disroot.org> Date: Tue, 17 Nov 2020 16:54:47 -0400 Message-ID: <87mtzf66w8.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: 74RDCDIGYBDD2XFH4GDYEUTFHRGRKFIQ X-Message-ID-Hash: 74RDCDIGYBDD2XFH4GDYEUTFHRGRKFIQ X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: -1.01 X-TUID: BYr50CYWTQWp "Jorge P. de Morais Neto" writes: > Hi. I use Notmuch 0.31.2 on Emacs 27.1.50. When I compose mail to a > mailing list, I would like Emacs to automatically set: > 1. "From" header to ~"Jorge P. de Morais Neto" ~ > 2. Ispell dictionary to "en_US" > 3. ~message-signature-file~ to "~/.signature--english" (and it should > actually insert the corresponding file as signature) > > Is there an easy way to do it, or do I have write Elisp and put it in > some Message mode hook? An easy-ish solution would be to use message-templ (available in debian as elpa-message-templ). I say "easy-ish" because it's a bit obscure; if you're not using Debian you'll have to install it from source. https://salsa.debian.org/emacsen-team/message-templ I think there are other solutions derived from Gnu's, but I'll let someone with personal experience speak to those.