From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/88947 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: How to change from address while in message buffer? Date: Mon, 06 Jan 2020 14:33:29 -0800 Message-ID: <87tv58w6yu.fsf@ericabrahamsen.net> References: <0100016f7a49e83d-b68757b3-72b5-4410-bfd7-5613a32a174b-000000@email.amazonses.com> <874kx8tg69.fsf@dick> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="57866"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Pankaj Jangid , ding@gnus.org To: dick.r.chiang@gmail.com Original-X-From: ding-owner+M37150@lists.math.uh.edu Tue Jan 07 00:09:21 2020 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iobUu-000EuZ-1k for ding-account@gmane.org; Tue, 07 Jan 2020 00:09:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.92.3) (envelope-from ) id 1iobUM-0001qi-By; Mon, 06 Jan 2020 17:08:46 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1ioawQ-0001X0-Be for ding@lists.math.uh.edu; Mon, 06 Jan 2020 16:33:42 -0600 Original-Received: from quimby.gnus.org ([95.216.78.240]) by mx1.math.uh.edu with esmtps (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1ioawO-0005jw-TQ for ding@lists.math.uh.edu; Mon, 06 Jan 2020 16:33:42 -0600 Original-Received: from ericabrahamsen.net ([52.70.2.18] helo=mail.ericabrahamsen.net) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ioawH-000382-VM for ding@gnus.org; Mon, 06 Jan 2020 23:33:36 +0100 Original-Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id B0818FA080; Mon, 6 Jan 2020 22:33:31 +0000 (UTC) In-Reply-To: <874kx8tg69.fsf@dick> (dick r. chiang's message of "Mon, 06 Jan 2020 16:42:54 -0500") List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:88947 Archived-At: dick.r.chiang@gmail.com writes: > PJ> how can I change the *From* header to something other than my default > PJ> user-mail-address. > > Contextually setting the *From* header based on whichever imap account I was > reading from proved a fairly tough problem. I eventually got it right, but > not before embarrassingly sending replies from my personal email address to my > professional one. > > I am very curious how others deal with what must be a very common problem. > > My soup-to-nuts email solution resides at > https://github.com/dickmao/gnus-imap-walkthrough and the 30 lines of elisp > that handle context-sensitive *From* are at > https://github.com/dickmao/gnus-imap-walkthrough/blob/c1246d335e7029f1ed4e4f3ae9db8f258748b791/dot.gnus#L16-L44 > > I suspect though that you're looking for a simpler solution. I'm almost certainly misunderstanding something here, but can't you do this with posting styles? When I want to compose a message with a certain set of styles (including the "From" header) I put point on the group I want to use to trigger the styles, and use "C-u m" instead of regular "m". Admittedly, this is actually kind of annoying and I wish there were a cleaner way of doing it. But it works just fine. No? Eric